1
Graphics / sf::Image private member "myTexture"
« on: December 08, 2011, 11:36:47 am »
I use sf::Image to load image to memory. Additional benefit is that it automatically creates the openGL texture identifier, so I was using it - I mean, I gonna create it anyway, so why not?
But then, I needed to access this texture identifier. So I am using now glBindMultiTextureEXT with the texture identifier extracted from sf::Image. (with the hacked code i mentioned earlier).
One of the drawbacks is that I had to force pixel update through Bind().
I think that Bind could actually get a parameter describing what texture unit I want to bind my texture to.
Or do you think that I should not use sf::Image as texture container and use it only for loading purposes?
But then, I needed to access this texture identifier. So I am using now glBindMultiTextureEXT with the texture identifier extracted from sf::Image. (with the hacked code i mentioned earlier).
One of the drawbacks is that I had to force pixel update through Bind().
I think that Bind could actually get a parameter describing what texture unit I want to bind my texture to.
Or do you think that I should not use sf::Image as texture container and use it only for loading purposes?