fix broken transparency mode of mesh objects

This commit is contained in:
wmayer
2017-12-19 23:24:30 +01:00
parent a1901cb20e
commit 60b8b0da67

View File

@@ -76,8 +76,16 @@ void SoFCIndexedFaceSet::GLRender(SoGLRenderAction *action)
if (this->coordIndex.getNum() < 3)
return;
if (!this->shouldGLRender(action))
if (!this->shouldGLRender(action)) {
// Transparency is handled inside 'shouldGLRender' but the base class
// somehow misses to reset the blending mode. This causes SoGLLazyElement
// not to switch on and off GL_BLEND mode and thus transparency doesn't
// work as expected. Calling SoMaterialBundle::sendFirst seems to fix the
// problem.
SoMaterialBundle mb(action);
mb.sendFirst();
return;
}
SoState * state = action->getState();
SbBool mode = Gui::SoFCInteractiveElement::get(state);