Canvas troubleshooting: Difference between revisions

Jump to navigation Jump to search
m
Line 230: Line 230:


=== Adding support for wireframe mode ===
=== Adding support for wireframe mode ===
To enable wireframe mode, we only need to change the osg::StateSet accordingly. Internally, each Canvas element contains a <code>osg::MatrixTransform</code> node - there's a virtual method <code>getOrCreateStateSet()</code> exposed returning the StateSet for each element, so that we can directly it:  
To enable wireframe mode, we only need to change the osg::StateSet accordingly. Internally, each Canvas element contains a <code>osg::MatrixTransform</code>[http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00494.html] node - there's a virtual method <code>getOrCreateStateSet()</code> exposed returning the StateSet for each element, so that we can directly it:  
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
osg::StateSet *state = getOrCreateStateSet();
osg::StateSet *state = getOrCreateStateSet();

Navigation menu