Fixed warnings

This commit is contained in:
Robert Osfield
2004-08-02 14:52:24 +00:00
parent 79bc32ad7c
commit 2d901bf7ee
3 changed files with 10 additions and 2 deletions

View File

@@ -232,7 +232,13 @@ void ProgramObject::dirtyShaderObjects()
void ProgramObject::releaseGLObjects(osg::State* state) const
{
const_cast<ProgramObject*>(this)->dirtyShaderObjects();
if (!state) const_cast<ProgramObject*>(this)->dirtyShaderObjects();
else
{
unsigned int contextID = state->getContextID();
const_cast<ProgramObject*>(this)->_shaderObjectList[contextID]->dirtyShaderObject();
}
}