OpenGLContext.passes.rendervisitor

Basic Rendering code implemented as a Visitor class
The RenderVisitor class provides a basic implementation of rendering a Context/scenegraph via a Visitor pattern. It provides support for setting up lights, backgrounds, viewpoints, transforms, and selection-names. (Those last two are only applicable to scenegraph-based applications).
A few helper classes provide post-node-traversal resetting mechanisms.

Classes

Pop matrix off model-view-stack
This is part of the visitor API used by the Transform method it restores the model-view matrix stack after a Transforming node's children are finished being visited.
This version is used when the model-view matrix stack has not overflowed, which allows us to use the more efficient glPopMatrix call.
Pop name off name-stack and restore selection-mode-state
This is part of the visitor API used by the Grouping method it restores the name stack after a Grouping node's children are finished being visited.
OpenGL Rendering visitor/traversal object for scenegraphs
This class does the "normal" setup and rendering for "normal" scenegraph nodes, Context(s) and SceneGraph(s) themselves. It is the base class of most RenderPass objects (with the notable exception of Transparent rendering passes (which do no traversal at the moment)).
Restore previous matrix in model-view-stack overflow situations
This is part of the visitor API used by the Transform method it restores the model-view matrix stack after a Transforming node's children are finished being visited.
This version is used when the model-view matrix stack has overflowed, using the more expensive glLoadMatrixd call to do the restoration.