So I simply want to load a texture and apply it to a sprite just like it is done in the tutorials.
I am using SFML 2.2, Visual Studio Express 2013.
The problem is that texture.loadFromFile() doesn't work at all for me. I have tried to place my file in a thousand different places and I always get the same result. Finally I decided to use the full path, same problem. I also tried different formats: PNG, GIF, JPG, BMP. I also tried to save them with different software: Photoshop, GIMP, paint. Nothing helps. The only error message displayed is:
Failed to load image "Exactly like that, only one double quote at the end.
Help!
Here's the minimal code I tried.
#include <SFML/Graphics.hpp>
int main()
{
sf::Texture texture;
if (!texture.loadFromFile("C:\\temp.png"))
return 1;
return 0;
}