Changed the default values of _drawBuffer and _readBuffer to make sure that the lazy state updating in State.glDrawBuffers(GLenum)/glReadBuffers(Glenum) doesn't ever ignore the first call.

This commit is contained in:
Robert Osfield 2018-03-07 17:44:48 +00:00
parent 178cba7cf0
commit 4dac60540a

View File

@ -51,8 +51,8 @@ State::State():
_shaderComposer = new ShaderComposer; _shaderComposer = new ShaderComposer;
_currentShaderCompositionProgram = 0L; _currentShaderCompositionProgram = 0L;
_drawBuffer = GL_NONE; _drawBuffer = GL_INVALID_ENUM; // avoid the lazy state mechanism from ignoreing the first call to State::glDrawBuffer() to make sure it's always passed to OpenGL
_readBuffer = GL_NONE; _readBuffer = GL_INVALID_ENUM; // avoid the lazy state mechanism from ignoreing the first call to State::glReadBuffer() to make sure it's always passed to OpenGL
_identity = new osg::RefMatrix(); // default RefMatrix constructs to identity. _identity = new osg::RefMatrix(); // default RefMatrix constructs to identity.
_initialViewMatrix = _identity; _initialViewMatrix = _identity;