Replaced the setTextureUnit(0) call in State::reset() with code that just

sets the member variables without requiring a graphics context.
This commit is contained in:
Robert Osfield
2006-11-21 16:59:04 +00:00
parent 91a9a87dd4
commit d0df2df7ad

View File

@@ -123,7 +123,18 @@ void State::reset()
_projection = _identity;
dirtyAllVertexArrays();
#if 0
// reset active texture unit values and call OpenGL
// note, this OpenGL op precludes the use of State::reset() without a
// valid graphics context, therefore the new implementation below
// is prefered.
setActiveTextureUnit(0);
#else
// reset active texture unit values without calling OpenGL
_currentActiveTextureUnit = 0;
_currentClientActiveTextureUnit = 0;
#endif
_lastAppliedProgramObject = 0;