OpenGl_LayerList::renderTransparent() - color mask is now set to write into Alpha channel of depth peeling FBOs.
OpenGl_View::blitBuffers() - avoid using undefined color for glClear(GL_COLOR_BUFFER_BIT) operation.
// initialize min/max depth buffer
aGlBlendBackFBO->BindDrawBuffer (aCtx);
aCtx->SetDrawBuffers (1, THE_DRAW_BUFFERS0);
+ aCtx->SetColorMaskRGBA (NCollection_Vec4<bool> (true)); // force writes into all components, including alpha
aCtx->core20fwd->glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
aCtx->core20fwd->glClear (GL_COLOR_BUFFER_BIT);
theReadDrawFbo->BindBuffer (aCtx);
}
aCtx->SetDrawBuffers (1, THE_DRAW_BUFFERS0);
+ aCtx->SetColorMask (true); // update writes into alpha component
break;
}
}
aCtx->SetColorMaskRGBA (NCollection_Vec4<bool> (true)); // force writes into all components, including alpha
aCtx->core20fwd->glClearDepth (1.0);
+ aCtx->core20fwd->glClearColor (0.0f, 0.0f, 0.0f, aCtx->caps->buffersOpaqueAlpha ? 1.0f : 0.0f);
aCtx->core20fwd->glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
aCtx->SetColorMask (true); // restore default alpha component write state
vrenderparams -oit peeling 4
vdump $imagedir/${casename}_peel.png
+# test opaqueAlpha option - result should be the same
+vcaps -opaqueAlpha 1
+vdump $imagedir/${casename}_peel_rgb.png
+vcaps -opaqueAlpha 0
+
# VTK viewer, just for comparison
set hasVtk 0
if { [vdriver -default] == "TKOpenGl" } {