SoGLContextGetCurrent Method (Boolean) |
Returns the current active OpenGL context (if any).
Namespace: OIV.Inventor.Devices
If this parameter is true, the getCurrent() function checks if the actual OpenGL context is the same as the one Open Inventor thinks is current. If the actual OpenGL context is different, for example because Open Inventor does not have a current context, then a new SoGLContext object is created with the actual OpenGL context. This check is expensive if called many times.
The current OpenGL context (or NULL if there isn't one).
By default this method returns the current active OpenGL context from the Open Inventor state. However it can also be used to get the actual current context from OpenGL, by passing true for the checkGLState parameter. In a typical Open Inventor application this is not necessary. It may be useful if Open Inventor should render using an OpenGL context created by the application or a third-party library.