Canvas troubleshooting: Difference between revisions

Jump to navigation Jump to search
m
Line 254: Line 254:


=== Adding support for disabling textures ===
=== Adding support for disabling textures ===
Analogous to the previous example, we can modify the osg::StateSet for a Canvas/CanvasElement to disable texturing, too:
<syntaxhighlight lang="cpp">
osg::StateSet *state = getOrCreateStateSet();
state->setTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::PROTECTED | osg::StateAttribute::OFF);
</syntaxhighlight>
The diff adding this as a run-time option to the Canvas system, looks like this:
<syntaxhighlight lang="diff">
<syntaxhighlight lang="diff">
</syntaxhighlight>
</syntaxhighlight>

Navigation menu