Commit 5505b789 authored by David Partyka's avatar David Partyka
Browse files

Use front buffer on Windows and back buffer everywhere else.

There appears to be a bug with using the back buffer on Windows. Continue using the front buffer for now.
parent 4ff58276
......@@ -106,9 +106,21 @@ vtkImageData* vtkSMContextViewProxy::CaptureWindowInternal(int magnification)
vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New();
w2i->SetInput(this->GetChartView()->GetRenderWindow());
w2i->SetMagnification(magnification);
// Use front buffer on Windows for now until we can figure out
// the bug with Charts when using the back buffer.
#ifdef WIN32
w2i->Update();
w2i->ReadFrontBufferOff();
w2i->ShouldRerenderOff();
#else
// Everywhere else use back buffer.
w2i->ReadFrontBufferOff();
// ShouldRerender was turned off previously. Why? Since we told w2i to read
// backbuffer, shouldn't we re-render again?
w2i->ShouldRerenderOn();
w2i->Update();
#endif
vtkImageData* capture = vtkImageData::New();
capture->ShallowCopy(w2i->GetOutput());
......
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