SFML community forums

Help => Graphics => Topic started by: Mars_999 on October 14, 2011, 09:42:02 pm

Title: sf::Image and OpenGL textures
Post by: Mars_999 on October 14, 2011, 09:42:02 pm
I am not sure about this, but from the looks of it, SFML1.6 I don't see anyway to have sf::Image just load a image file and not create a OpenGL texture? I just want to use sf::Image to load the data, and allow me to use the pixel pointer to upload the data to OpenGL so I can create the kind of texture format I would like to use. e.g. mipmapped, compressed ect...

As of now I allow it to go through the whole process and delete itself, but seems like a huge waste of time, and OpenGL has to load/unload a texture right away....

Thanks
Title: sf::Image and OpenGL textures
Post by: Nexus on October 14, 2011, 09:50:39 pm
No, in SFML 1, this is not possible.

SFML 2 introduced the separation between sf::Image (pixel data) and sf::Texture (OpenGL texture).
Title: sf::Image and OpenGL textures
Post by: Mars_999 on October 14, 2011, 09:53:00 pm
Quote from: "Nexus"
No, in SFML 1, this is not possible.

SFML 2 introduced the separation between sf::Image (pixel data) and sf::Texture (OpenGL texture).


Thanks Nexus. I will keep this in mind and upgrade to SFML 2.0 when it's out then. Sigh the wait continues....
Title: sf::Image and OpenGL textures
Post by: Nexus on October 14, 2011, 09:55:42 pm
You can already upgrade now and download the current revision from GitHub. Many people use the development version of SFML 2.
Title: sf::Image and OpenGL textures
Post by: slotdev on October 14, 2011, 10:43:50 pm
Quote from: "Mars_999"
Quote from: "Nexus"
No, in SFML 1, this is not possible.

SFML 2 introduced the separation between sf::Image (pixel data) and sf::Texture (OpenGL texture).


Thanks Nexus. I will keep this in mind and upgrade to SFML 2.0 when it's out then. Sigh the wait continues....


I use SFML 2.0 in commercial products. It's fine as it is now :)
Title: sf::Image and OpenGL textures
Post by: bananu7 on October 15, 2011, 12:42:58 am
Yup, and it's the best way to make SFML-2.0-RC better ;p