Added support for RenderBin's have a local top level StateSet. This is now

used by default in the depth sorted bin.
This commit is contained in:
Robert Osfield
2006-06-29 15:57:24 +00:00
parent d74397ce58
commit 30265ac0b3
7 changed files with 44 additions and 6 deletions

View File

@@ -194,10 +194,12 @@ void SceneView::setDefaults(unsigned int options)
// enable depth testing by default.
_globalStateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
#if 0
// set up an alphafunc by default to speed up blending operations.
osg::AlphaFunc* alphafunc = new osg::AlphaFunc;
alphafunc->setFunction(osg::AlphaFunc::GREATER,0.0f);
_globalStateSet->setAttributeAndModes(alphafunc, osg::StateAttribute::ON);
alphafunc->setFunction(osg::AlphaFunc::GREATER,1.0f);
_globalStateSet->setAttributeAndModes(alphafunc, osg::StateAttribute::OFF);
#endif
// set up an texture environment by default to speed up blending operations.
osg::TexEnv* texenv = new osg::TexEnv;