Inheriting render states

The state set of a node will affect the current node and its children. For example, the osg::PolygonMode attribute set to node transformation1 will make all of its children display as outlined. However, a child node's state set can override its parent's, that is, the rendering states will be inherited from the parent node unless a child node changes the behavior. The following image shows how different polygon mode states are traversed an imaginary scene graph:

Inheriting render states

Sometimes you may want different behaviors. For example, in common 3D editor software, users can load multiple models from files and render all of them as textured, ...

Get OpenSceneGraph 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.