From Wojciech Lewandowski, Fixed handling of empty Program.
This commit is contained in:
parent
4b769494cb
commit
d849574a93
@ -111,7 +111,12 @@ void GLObjectsVisitor::apply(osg::StateSet& stateset)
|
||||
stateset.compileGLObjects(*_renderInfo.getState());
|
||||
|
||||
osg::Program* program = dynamic_cast<osg::Program*>(stateset.getAttribute(osg::StateAttribute::PROGRAM));
|
||||
if (program) _lastCompiledProgram = program;
|
||||
if (program) {
|
||||
if( program->isFixedFunction() )
|
||||
_lastCompiledProgram = NULL; // It does not make sense to apply uniforms on fixed pipe
|
||||
else
|
||||
_lastCompiledProgram = program;
|
||||
}
|
||||
|
||||
if (_lastCompiledProgram.valid() && !stateset.getUniformList().empty())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user