Commit 6cbe8c45 authored by Paul Lafoix's avatar Paul Lafoix Committed by Kitware Robot
Browse files

Merge topic 'SupportFaceCullingSurfaceLIC'

a8129ebc

 Add support for face culling in SurfaceLICMapper
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Mathieu Westphal's avatarMathieu Westphal <mathieu.westphal@kitware.com>
Acked-by: Timothee Chabat's avatarTimothee Chabat <timothee.chabat@kitware.com>
Merge-request: !7535
parents bbe3ca6b a8129ebc
......@@ -272,6 +272,7 @@ void vtkCompositeSurfaceLICMapper::Render(vtkRenderer* ren, vtkActor* actor)
vtkOpenGLRenderWindow* rw = vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow());
vtkOpenGLState* ostate = rw->GetState();
vtkOpenGLState::ScopedglEnableDisable bsaver(ostate, GL_BLEND);
vtkOpenGLState::ScopedglEnableDisable cfsaver(ostate, GL_CULL_FACE);
vtkNew<vtkOpenGLFramebufferObject> fbo;
fbo->SetContext(vtkOpenGLRenderWindow::SafeDownCast(ren->GetRenderWindow()));
......@@ -288,6 +289,9 @@ void vtkCompositeSurfaceLICMapper::Render(vtkRenderer* ren, vtkActor* actor)
this->LICInterface->CompletedGeometry();
// Disable cull face to make sure geometry won't be culled again
ostate->vtkglDisable(GL_CULL_FACE);
// --------------------------------------------- composite vectors for parallel LIC
this->LICInterface->GatherVectors();
......
......@@ -181,6 +181,7 @@ void vtkSurfaceLICMapper::RenderPiece(vtkRenderer* renderer, vtkActor* actor)
vtkOpenGLRenderWindow* rw = vtkOpenGLRenderWindow::SafeDownCast(renderer->GetRenderWindow());
vtkOpenGLState* ostate = rw->GetState();
vtkOpenGLState::ScopedglEnableDisable bsaver(ostate, GL_BLEND);
vtkOpenGLState::ScopedglEnableDisable cfsaver(ostate, GL_CULL_FACE);
vtkNew<vtkOpenGLFramebufferObject> fbo;
fbo->SetContext(rw);
......@@ -192,12 +193,16 @@ void vtkSurfaceLICMapper::RenderPiece(vtkRenderer* renderer, vtkActor* actor)
// draw the geometry
this->LICInterface->PrepareForGeometry();
this->UpdateCameraShiftScale(renderer, actor);
this->RenderPieceStart(renderer, actor);
this->RenderPieceDraw(renderer, actor);
this->RenderPieceFinish(renderer, actor);
this->LICInterface->CompletedGeometry();
// Disable cull face to make sure geometry won't be culled again
ostate->vtkglDisable(GL_CULL_FACE);
// --------------------------------------------- compoiste vectors for parallel LIC
this->LICInterface->GatherVectors();
......
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