Helper class to make the shared GL context current if there is no valid current context.
More...
Helper class to make the shared GL context current if there is no valid current context.
Example:
* class MyTexture {
* public:
* MyTexture() : _textureId(0) {
*
* glGenTextures(1, &_textureId);
* }
*
* ~MyTexture() {
*
* glDeleteTextures(1, &_texureId);
* _textureId = 0;
* }
*
*
*
*
* void Bind() {
* glBindTexture(GL_TEXTURE_2D, _textureId);
* }
*
* void Unbind() {
* glBindTexture(GL_TEXTURE_2D, 0);
* }
*
* ...
*
* private:
* GLuint _textureId;
*
* };
*
Definition at line 299 of file glContext.h.