Added the ability to set the global stateset, as use this RenderStageLighting

This commit is contained in:
Robert Osfield
2004-08-07 09:42:19 +00:00
parent 2754f46c5d
commit 857d8e2435
2 changed files with 59 additions and 2 deletions

View File

@@ -53,7 +53,9 @@ void RenderStageLighting::draw(osg::State& state,RenderLeaf*& previous)
// tell state about.
state.haveAppliedAttribute(litr->first.get());
// set this state as a global default
state.setGlobalDefaultAttribute(litr->first.get());
}
for(TexUnitAttrMatrixListMap::iterator titr=_texAttrListMap.begin();
@@ -76,6 +78,8 @@ void RenderStageLighting::draw(osg::State& state,RenderLeaf*& previous)
// tell state about.
state.haveAppliedTextureAttribute(titr->first, litr->first.get());
// set this state as a global default
state.setGlobalDefaultTextureAttribute(titr->first, litr->first.get());
}
}