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.


Messages - heu

Pages: [1]
1
Graphics / Re: texture.loadFromFile doesn't work
« on: February 03, 2015, 05:23:10 pm »
Thanks for the answers!

I managed to figure out what was wrong.

I was running the code with a debug configuration. Switching to release suddenly got it working.

It turns out I had set the release .libs to the debug linker options under Properties | Linker | Additional dependencies. Just by adding -d to the file names did the trick!

Everything works fine now! Thanks again.

2
Graphics / [SOLVED] texture.loadFromFile doesn't work
« on: February 03, 2015, 12:47:37 am »
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;
}
 



Pages: [1]
anything