Skip to content
Snippets Groups Projects
Commit 9875d9b5 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot
Browse files

Merge topic 'fix_testing'


5c9ffc1b Fix grabs from back-buffer.

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Cory Quammen's avatarCory Quammen <cory.quammen@kitware.com>
Merge-request: !2737
parents 35da63f2 5c9ffc1b
No related branches found
No related tags found
No related merge requests found
......@@ -395,9 +395,14 @@ int vtkTesting::RegressionTest(double thresh, ostream &os)
std::ostringstream out1;
// perform and extra render to make sure it is displayed
int swapBuffers = this->RenderWindow->GetSwapBuffers();
// since we're reading from back-buffer, it's essential that we turn off swapping
// otherwise what remains in the back-buffer after the swap is undefined by OpenGL specs.
this->RenderWindow->SwapBuffersOff();
this->RenderWindow->Render();
rtW2if->ReadFrontBufferOff();
rtW2if->Update();
this->RenderWindow->SetSwapBuffers(swapBuffers); // restore swap state.
int res = this->RegressionTest(rtW2if.Get(), thresh, out1);
if (res == FAILED)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment