Commit fd52df39 authored by Bill Lorensen's avatar Bill Lorensen

ENH: Before capturing the window, do two renders and disable reading the front...

ENH: Before capturing the window, do two renders and disable reading the front buffer. This strategy should prevent the capture of windows that are covered. It is the same stratgegy used by vtkTesting to capture regression test images.
parent d9a2710e
......@@ -114,13 +114,14 @@ int TestTilingCxx(int argc, char* argv[])
ren2->SetBackground(0.3, 0.3, 0.3);
// render the image
renWin->Render();
scalarBar->SetNumberOfLabels(8);
renWin->Render();
renWin->Render(); // perform an extra render before capturing window
VTK_CREATE(vtkWindowToImageFilter, w2i);
w2i->SetInput(renWin);
w2i->SetMagnification(2);
w2i->ReadFrontBufferOff();
w2i->Update();
// copy the output
......
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