Skip to content

Fixed #18047: modified Cocoa drawRect: to push/pop OpenGLState before Render

Sean McBride requested to merge seanm/vtk:Issue18047 into master

Patch from Ken Martin:

We think macOS is doing stuff in OpenGL as part of its process for getting the image on the screen. Which is reasonable. But it means that macOS may change the OpenGL state in a way that VTK is not aware of. And likewise VTK could change state in a way that screws up what macOS is expecting. So the added code tries to avoid all that by making some extra OpenGL calls to protect both sides of the equation.

Superficially, this fixes "Error in cache state for GL_SCISSOR_BOX" logs that were previously spewed while resizing a window.

Backport: release

Merge request reports