Commit 385789cd authored by Ken Martin's avatar Ken Martin

rebassed fix for front buffer draw pixels not showing

See vtk/vtk#16847

It seems for front buffer pixel draws to show up
the OpenGL buffer has to be flushed.
parent 94d03e0b
......@@ -1114,6 +1114,12 @@ int vtkOpenGLRenderWindow::SetPixelData(int x1, int y1, int x2, int y2,
this->DrawPixels(x1, y1, x2, y2, 3, VTK_UNSIGNED_CHAR, data);
// This seems to be necessary for the image to show up
if (front)
{
glFlush();
}
glDrawBuffer(buffer);
if (glGetError() != GL_NO_ERROR)
......@@ -1366,6 +1372,12 @@ int vtkOpenGLRenderWindow::SetRGBAPixelData(int x1, int y1, int x2, int y2,
this->DrawPixels(x1, y1, x2, y2, 4, VTK_FLOAT, data);
}
// This seems to be necessary for the image to show up
if (front)
{
glFlush();
}
glDrawBuffer(buffer);
if (glGetError() != GL_NO_ERROR)
......
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