Skip to content
/ VTK Public

Commit 3bd2e83

Browse files
committed
ReadPixels: Check for errors only when VTK is configured to report errors
1 parent fe02942 commit 3bd2e83

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,9 +1068,11 @@ int vtkOpenGLRenderWindow::ReadPixels(
10681068
}
10691069

10701070
// Must clear previous errors first.
1071+
#if VTK_REPORT_OPENGL_ERRORS
10711072
while (glGetError() != GL_NO_ERROR)
10721073
{
10731074
}
1075+
#endif
10741076

10751077
this->GetState()->vtkglDisable(GL_SCISSOR_TEST);
10761078

0 commit comments

Comments
 (0)