Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - BigZiggityZ

Pages: [1]
1
Graphics / LoadFromFile issues in VS2012
« on: May 11, 2013, 09:34:24 pm »
Hello,

Whenever I try to call LoadFromFile, all I get is a message in the console that says 'failed to load "texture.png' followed by a long stream of gibberish, without ever closing the quote marks on texture.png. In addition, I get a seemingly random sequence of beeps coming out of my speakers. While reading I found that this can be a result of trying to access a file that does not exist, but the error still happens when I write out the full file path, e.g. "C:\Users\Username\Documents\Visual Studio 2012\Projects\SFML Game1\Debug\ball.jpg". I am completely lost and hoping someone can offer some insight.

Code:

#include<SFML\graphics.hpp>
using namespace sf;

int main()
{
    Texture myText;
        if (!myText.loadFromFile("Ball.jpg"))
        {
                return 1;
        }
    return 0;
}
 

Where Ball.jpg is in the directory "C:\Users\Username\Documents\Visual Studio 2012\Projects\SFML Game1\Debug" and "C:\Users\Username\Documents\Visual Studio 2012\Projects\SFML Game1\SFML Game1"

Pages: [1]