Added clear of lazy uniform updating structure on relink, also added debug
output of shader being compiled.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -315,6 +315,8 @@ void Shader::PerContextShader::compileShader()
|
||||
if( ! _needsCompile ) return;
|
||||
_needsCompile = false;
|
||||
|
||||
osg::notify(osg::INFO)<<"Compiling source "<<_shader->getShaderSource()<<std::endl;
|
||||
|
||||
GLint compiled = GL_FALSE;
|
||||
const char* sourceText = _shader->getShaderSource().c_str();
|
||||
_extensions->glShaderSource( _glShaderHandle, 1, &sourceText, NULL );
|
||||
|
||||
@@ -182,6 +182,8 @@ void State::popAllStateSets()
|
||||
|
||||
applyProjectionMatrix(0);
|
||||
applyModelViewMatrix(0);
|
||||
|
||||
_lastAppliedProgramObject = 0;
|
||||
}
|
||||
|
||||
void State::popStateSet()
|
||||
|
||||
Reference in New Issue
Block a user