Skip to content
Snippets Groups Projects
Commit 0b1ac9aa authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Read/write from correct buffers.

vtkInteractorStyleDrawPolygon should write to back buffer, since it
calls Frame() to swap buffers after the write.
parent 11fe7c97
No related branches found
No related tags found
No related merge requests found
......@@ -194,7 +194,7 @@ void vtkInteractorStyleDrawPolygon::OnLeftButtonUp()
int *size = this->Interactor->GetRenderWindow()->GetSize();
unsigned char *pixels = this->PixelArray->GetPointer(0);
this->Interactor->GetRenderWindow()->SetPixelData(
0, 0, size[0]-1, size[1]-1, pixels, 1);
0, 0, size[0]-1, size[1]-1, pixels, 0);
this->Interactor->GetRenderWindow()->Frame();
}
......@@ -229,7 +229,7 @@ void vtkInteractorStyleDrawPolygon::DrawPolygon()
this->Internal->DrawPixels(start, end, pixels, size);
}
this->Interactor->GetRenderWindow()->SetPixelData(0, 0, size[0]-1, size[1]-1, pixels, 1);
this->Interactor->GetRenderWindow()->SetPixelData(0, 0, size[0]-1, size[1]-1, pixels, 0);
this->Interactor->GetRenderWindow()->Frame();
}
......
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