Skip to content
/ VTK Public
forked from Kitware/VTK

Commit b4fa8ba

Browse files
jspanchujcfr
authored andcommitted
[Backport] ReadPixels: Check for errors only when VTK is configured to report errors
Merge-request: vtk/vtk!10646 (cherry picked from commit Kitware/VTK@3bd2e83)
1 parent fc21328 commit b4fa8ba

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
@@ -1080,9 +1080,11 @@ int vtkOpenGLRenderWindow::ReadPixels(
10801080
}
10811081

10821082
// Must clear previous errors first.
1083+
#if VTK_REPORT_OPENGL_ERRORS
10831084
while (glGetError() != GL_NO_ERROR)
10841085
{
10851086
}
1087+
#endif
10861088

10871089
this->GetState()->vtkglDisable(GL_SCISSOR_TEST);
10881090

0 commit comments

Comments
 (0)