Skip to content

Commit

Permalink
Renderer: fix legacy shape rendering with transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder committed Sep 4, 2024
1 parent 99c9d76 commit 631044a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Gui/Inventor/SoFCVertexCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#include <Inventor/elements/SoNormalElement.h>
#include <Inventor/elements/SoGLVBOElement.h>
#include <Inventor/elements/SoCullElement.h>
#include <Inventor/elements/SoShapeStyleElement.h>
#include <Inventor/sensors/SoNodeSensor.h>
#include <Inventor/nodes/SoNode.h>
#include <Inventor/nodes/SoMarkerSet.h>
Expand Down Expand Up @@ -1184,6 +1185,10 @@ SoFCVertexCache::renderTriangles(SoGLRenderAction * action, const int arrays, in
| GL_POLYGON_BIT);
glPushMatrix();
state->push();
// Legacy shape with sorted transparency type will delay rendering to be
// done by SoGLRenderAction, but we are not using SoGLRenderAction for
// rendering, so must disable here.
SoShapeStyleElement::setTransparencyType(state, SoGLRenderAction::BLEND);
PRIVATE(this)->node->GLRender(action);
state->pop();
glPopAttrib();
Expand Down

0 comments on commit 631044a

Please sign in to comment.