SFML community forums
Help => Graphics => Topic started by: juanmemo on October 13, 2015, 10:30:00 pm
-
Why the code in the attachment is not displaying my image?
-
How about, do you check return value of loadFromFile?
-
Its returning true.
-
Please post the code directly, it's always better if you avoid a download to people who want to help you.
I haven't looked in detail, but a few remarks:
- track GL errors, that's the only way to immediately know when something goes wrong with OpenGL
- don't use sf::RenderWindow for pure OpenGL drawing, use sf::Window
- start with simpler stuff if nothing shows (remove unnecessary render states)
-
Also the coordinates for stuff in this code look not right in old and kind openGL the coordinates are in range from -1.0 to 1.0 in SFML it is avoided by using projection matrixes(that translate pixell coordinates to range from -1 - 1) but as i see, that you use default projection matrix and as i mentioned - default projection matrix has range from -1 to 1 that means, that point thats coords are smaller than -1 or bigger than 1 is out of screen. thanks for reading :)