SFML community forums
Help => Graphics => Topic started by: Robert42 on September 18, 2011, 12:39:50 pm
-
I wonder if it's a good idea to create own gl resources using sf::GlResource baseclass.
The documentation says the sf::GlResource class to be "for internal use only".
Does this mean "Bad Idea"?
I've taken a look on the source of the texture class. Are there other things to keep in Mind than calling EnsureGlContext(); before any OpenGL functions?
-
I think it can safely be used for your own classes. The constructor and destructor do the job automatically, so you just have to call EnsureGlContext() before doing OpenGL calls.
It's marked "for internal use only" because it was written for my own needs, and was not supposed to be used publicly. But if you find it useful, you can use it.
-
thx