VISH  0.2
Public Member Functions | Static Public Member Functions
Wizt::GLContextChecker Class Reference

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>

List of all members.

Public Member Functions

Static Public Member Functions


Detailed Description

This is a convenience class to check if an OpenGL context is currently active and available.

        if (GLContextChecker::invalidContext() )
        {
                not good... no OpenGL context...
        }

Member Function Documentation

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]
Returns:
Positive: There is no context. Zero: An OpenGL context is available and active. Negative: Context information could not be determined.

The documentation for this class was generated from the following files: