Fixed warnings

This commit is contained in:
Robert Osfield
2004-08-02 13:57:47 +00:00
parent 9b33dee6ac
commit ebad31c3dd
6 changed files with 46 additions and 9 deletions

View File

@@ -191,7 +191,16 @@ void VertexProgram::apply(State& state) const
void VertexProgram::releaseGLObjects(State* state) const
{
const_cast<VertexProgram*>(this)->dirtyVertexProgramObject();
if (!state) const_cast<VertexProgram*>(this)->dirtyVertexProgramObject();
else
{
unsigned int contextID = state->getContextID();
if (_vertexProgramIDList[contextID] != 0)
{
VertexProgram::deleteVertexProgramObject(contextID,_vertexProgramIDList[contextID]);
_vertexProgramIDList[contextID] = 0;
}
}
}