Added clear of lazy uniform updating structure on relink, also added debug

output of shader being compiled.
This commit is contained in:
Robert Osfield
2005-05-12 08:54:11 +00:00
parent 25b36ef648
commit fe384e53c7
3 changed files with 5 additions and 0 deletions

View File

@@ -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();

View File

@@ -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 );

View File

@@ -182,6 +182,8 @@ void State::popAllStateSets()
applyProjectionMatrix(0);
applyModelViewMatrix(0);
_lastAppliedProgramObject = 0;
}
void State::popStateSet()