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

Author Topic: sf::Image and OpenGL textures  (Read 3003 times)

0 Members and 1 Guest are viewing this topic.

Mars_999

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • Email
sf::Image and OpenGL textures
« 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

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
sf::Image and OpenGL textures
« Reply #1 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).
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Mars_999

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • Email
sf::Image and OpenGL textures
« Reply #2 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....

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
sf::Image and OpenGL textures
« Reply #3 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
sf::Image and OpenGL textures
« Reply #4 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 :)
SFML 2.1

bananu7

  • Newbie
  • *
  • Posts: 25
    • View Profile
sf::Image and OpenGL textures
« Reply #5 on: October 15, 2011, 12:42:58 am »
Yup, and it's the best way to make SFML-2.0-RC better ;p