Skip to content

Remove direct disable of GL_SCISSOR_TEST and reset viewport state

The vtkOpenGLState for GL_SCISSOR_TEST could be modified elsewhere. If it was enabled in the state object, then invoking glDisable(GL_SCISSOR_TEST) directly prior to setting the value in the OpenGL state would cause a warning to be thrown with every render because the cached state no longer reflected the OpenGL state. Moreover, the direct call was redundant as the vtkOpenGLState object will make the direct call as needed.

Also, the viewport may be modified outside the OpenGL widget. Reset the viewport state in the vtkOpenGLState cache.

Edited by Cory Quammen

Merge request reports