Commit daba574d authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot
Browse files

Merge topic 'osx_fix_opengl_cache'


 fix issue with glViewport on OSX
Acked-by: Kitware Robot's avatarKitware Robot <>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <>
Merge-request: !4656
parents 83dddfb9 515802d0
......@@ -146,6 +146,11 @@ void vtkOpenGLState::CheckState()
GLint iparams[4];
#if defined(__APPLE__)
// OSX systems seem to change the glViewport upon a window resize
// under the hood, so our viewport cache cannot be trusted
::glGetIntegerv(GL_VIEWPORT, iparams);
if (
iparams[0] != this->CurrentState.Viewport[0] ||
......@@ -495,7 +500,7 @@ void vtkOpenGLState::vtkglViewport(GLint x, GLint y, GLsizei width, GLsizei heig
#ifndef NO_CACHE
#if !defined(NO_CACHE) && !defined(__APPLE__)
if (this->CurrentState.Viewport[0] != x ||
this->CurrentState.Viewport[1] != y ||
this->CurrentState.Viewport[2] != width ||
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment