diff --git a/src/osg/Program.cpp b/src/osg/Program.cpp index adc004d7f..b8b6804d3 100644 --- a/src/osg/Program.cpp +++ b/src/osg/Program.cpp @@ -2156,6 +2156,7 @@ void Program::PerContextProgram::linkProgram() _uniformInfoMap.clear(); _attribInfoMap.clear(); + _lastAppliedUniformList.clear(); // set any explicit vertex attribute bindings const AttribBindingList& bindlist = _program->getAttribBindingList(); diff --git a/src/osg/Shader.cpp b/src/osg/Shader.cpp index 747225fda..e54b30a3b 100644 --- a/src/osg/Shader.cpp +++ b/src/osg/Shader.cpp @@ -315,6 +315,8 @@ void Shader::PerContextShader::compileShader() if( ! _needsCompile ) return; _needsCompile = false; + osg::notify(osg::INFO)<<"Compiling source "<<_shader->getShaderSource()<getShaderSource().c_str(); _extensions->glShaderSource( _glShaderHandle, 1, &sourceText, NULL ); diff --git a/src/osg/State.cpp b/src/osg/State.cpp index f69aa8014..bf6ea2f1e 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -182,6 +182,8 @@ void State::popAllStateSets() applyProjectionMatrix(0); applyModelViewMatrix(0); + + _lastAppliedProgramObject = 0; } void State::popStateSet()