Skip to content
Snippets Groups Projects
Commit f4f64c6d authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot
Browse files

Merge topic 'qvtk-native-widget-gl-state-fix-release' into release


bfc44285 Silence viewport warnings
a56aed3d Remove direct disable of GL_SCISSOR_TEST

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarDavid E. DeMarle <dave.demarle@kitware.com>
Merge-request: !4872
parents 3d41c0b5 bfc44285
No related branches found
No related tags found
No related merge requests found
......@@ -545,8 +545,14 @@ void QVTKOpenGLNativeWidget::paintGL()
f->glBindFramebuffer(GL_READ_FRAMEBUFFER, this->FBO->handle());
f->glReadBuffer(GL_COLOR_ATTACHMENT0);
// The viewport state may be modified outside the vtkOpenGLState mechanism, so reset the state here.
ostate->ResetGlViewportState();
// If you get a vtkOpenGLState warning from the call below, you can add
// a call to ostate->ResetEnumState(GL_SCISSOR_TEST); to reset the cache state
// to whatever the value in OpenGL is.
ostate->vtkglDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer.
f->glDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer.
f->glBlitFramebuffer(0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1],
0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1], GL_COLOR_BUFFER_BIT,
GL_NEAREST);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment