Fixed handling of osg::Program so that it's not overriden by shader composition when enabled
This commit is contained in:
parent
4493d11ca3
commit
5ed399ca48
@ -535,13 +535,19 @@ void State::apply(const StateSet* dstate)
|
||||
else if (unit<_textureAttributeMapList.size()) applyAttributeMapOnTexUnit(unit,_textureAttributeMapList[unit]);
|
||||
}
|
||||
|
||||
const Program::PerContextProgram* previousLastAppliedProgramObject = _lastAppliedProgramObject;
|
||||
|
||||
applyModeList(_modeMap,dstate->getModeList());
|
||||
applyAttributeList(_attributeMap,dstate->getAttributeList());
|
||||
|
||||
if (_shaderCompositionEnabled)
|
||||
{
|
||||
if (previousLastAppliedProgramObject == _lastAppliedProgramObject || _lastAppliedProgramObject==0)
|
||||
{
|
||||
// No program has been applied by the StateSet stack so assume shader composition is required
|
||||
applyShaderComposition();
|
||||
}
|
||||
}
|
||||
|
||||
if (dstate->getUniformList().empty())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user