Skip to content
Snippets Groups Projects
Commit 0758b4b1 authored by David Lonie's avatar David Lonie Committed by Kitware Robot
Browse files

Merge topic 'pv17088-surfacelic_fxaa_fix'


17d4747e Restore FBO bindings after SurfaceLIC rendering.

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !2313
parents 19a3e523 17d4747e
No related merge requests found
......@@ -445,7 +445,7 @@ int vtkImageDataLIC2D::RequestData(
vtkOpenGLFramebufferObject *drawFbo = vtkOpenGLFramebufferObject::New();
drawFbo->SetContext(this->Context);
drawFbo->SaveCurrentBindings();
drawFbo->SaveCurrentBindingsAndBuffers();
drawFbo->Bind(GL_FRAMEBUFFER);
drawFbo->AddColorAttachment(GL_FRAMEBUFFER, 0U, magVectorTex);
drawFbo->ActivateDrawBuffer(0U);
......@@ -493,7 +493,7 @@ int vtkImageDataLIC2D::RequestData(
vectorTex->Delete();
shaderHelper.ReleaseGraphicsResources(this->Context);
drawFbo->UnBind(GL_FRAMEBUFFER);
drawFbo->RestorePreviousBindingsAndBuffers();
drawFbo->Delete();
}
......
......@@ -708,6 +708,9 @@ void vtkSurfaceLICInterface::CopyToScreen()
//
this->Internals->Updated();
// Restore the FBO bindings:
this->Internals->FBO->RestorePreviousBindingsAndBuffers();
}
//----------------------------------------------------------------------------
......@@ -1158,6 +1161,9 @@ void vtkSurfaceLICInterface::InitializeResources()
fbo->Delete();
}
// Store the current framebuffer config so we can restore it after rendering:
this->Internals->FBO->SaveCurrentBindingsAndBuffers();
// load shader codes
vtkOpenGLRenderWindow *renWin = this->Internals->Context;
......
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