Commit 87dc9cac authored by David E DeMarle's avatar David E DeMarle
Browse files

Merge branch 'fix-gl2-depth-w-aa' into 'master'

Fix depth peeling with antialiasing

Patch restores the aa state after the peels like the OpenGL1
version did.

@ken-martin

See merge request !351
parents 01698ec9 388428d1
......@@ -401,6 +401,7 @@ void vtkDepthPeelingPass::Render(const vtkRenderState *s)
glClearColor(0.0,0.0,0.0,0.0); // always clear to black
// glClearDepth(static_cast<GLclampf>(1.0));
#ifdef GL_MULTISAMPLE
GLboolean multiSampleStatus = glIsEnabled(GL_MULTISAMPLE);
glDisable(GL_MULTISAMPLE);
#endif
glDisable(GL_BLEND);
......@@ -530,6 +531,13 @@ void vtkDepthPeelingPass::Render(const vtkRenderState *s)
// do the final blend
this->BlendFinalPeel(renWin);
#ifdef GL_MULTISAMPLE
if(multiSampleStatus)
{
glEnable(GL_MULTISAMPLE);
}
#endif
// unload the last two textures
this->TranslucentRGBATexture->Deactivate();
this->OpaqueRGBATexture->Deactivate();
......
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