![]() |
VR-Forces Development_Version Class Documentation
|
It is possible to call OpenGL directly from an OSG drawable.
It is very easy to corrupt the scene rendering when you do this. OSG maintains a copy of the OpenGL state in its own state object osg::State. If this state object and the actual OpenGL state are not synchronized, then the rendering will not be correct. If you must call OpenGL directly, you must undo any changes to the OpenGL state that you make. After your code is executed, the OpenGL state must be returned to the values it had before your code was executed. This will ensure that the OSG and OpenGL states are synchronized.
The following pseudo-code is an example of what must happen for all OpenGL states:
OpenGL has a callback that sends debug messages to the console. To enable this callback, set the VRV_GL_DEBUG environment variable to any value. (The value does not matter. The environment variable just needs to exist.)
[<< Cockpit Display Updaters] [Home] [Transforming Nodes Programmatically >>]