VISH
0.2
|
This is a convenience class to check if an OpenGL context is currently active and available. More...
#include </home/werner/origo/vish/ocean/GLvish/MetaGLViewerCreator.hpp>
This is a convenience class to check if an OpenGL context is currently active and available.
if (GLContextChecker::invalidContext() ) { not good... no OpenGL context... }
virtual const void* Wizt::GLContextChecker::CurrentGLContextID | ( | ) | const [pure virtual] |
Get a an OpenGL context ID, which is useful to check if at this point of the code calling OpenGL functions is allowed.
This is especcially useful for destructors of objects that clean up OpenGL objects. No explicit OpenGL context object is available then, but this function allows to check for validity. Such object may only be destroyed if there is a current OpenGL context, otherwise it will lead to runtime errors.
int Wizt::GLContextChecker::invalidContext | ( | ) | [static] |