MCPcopy Index your code
hub / github.com/ad-si/LuaCAD / renderIntersectedBack

Function renderIntersectedBack

OpenCSG/src/renderSCS.cpp:711–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

709 }
710
711 void renderIntersectedBack(const std::vector<Primitive*>& primitives) {
712 // where a back face of intersected shape is in front of any subtracted shape
713 // mask fragment as invisible. Updating depth values is not necessary, so when
714 // having IDs, this is kind of simple.
715 channelMgr->renderToChannel(true);
716 glEnable(GL_CULL_FACE);
717 glCullFace(GL_FRONT);
718 glDepthMask(GL_FALSE);
719 glDepthFunc(GL_LESS);
720 glColor4ub(0, 0, 0, 0);
721
722 for (std::vector<Primitive*>::const_iterator i = primitives.begin(); i != primitives.end(); ++i) {
723 (*i)->render();
724 }
725
726 glDepthMask(GL_TRUE);
727 }
728
729 } // unnamed namespace
730

Callers 1

renderSCSFunction · 0.85

Calls 4

renderToChannelMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected