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) ...@@ -106,9 +106,21 @@ vtkImageData* vtkSMContextViewProxy::CaptureWindowInternal(int magnification)
vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New(); vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New();
w2i->SetInput(this->GetChartView()->GetRenderWindow()); w2i->SetInput(this->GetChartView()->GetRenderWindow());
w2i->SetMagnification(magnification); 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->Update();
w2i->ReadFrontBufferOff(); w2i->ReadFrontBufferOff();
w2i->ShouldRerenderOff(); w2i->ShouldRerenderOff();
// Everywhere else use back buffer.
// ShouldRerender was turned off previously. Why? Since we told w2i to read
// backbuffer, shouldn't we re-render again?
vtkImageData* capture = vtkImageData::New(); vtkImageData* capture = vtkImageData::New();
capture->ShallowCopy(w2i->GetOutput()); 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