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

Function renderLayer

OpenCSG/src/primitiveHelper.cpp:126–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124 }
125
126 void renderLayer(unsigned int layer, const std::vector<Primitive*>& primitives) {
127 glStencilFunc(GL_EQUAL, layer, 255);
128 glStencilOp(GL_INCR, GL_INCR, GL_INCR);
129 glStencilMask(255);
130 glEnable(GL_STENCIL_TEST);
131
132 glEnable(GL_CULL_FACE);
133 for (std::vector<Primitive*>::const_iterator j = primitives.begin(); j != primitives.end(); ++j) {
134 glCullFace((*j)->getOperation() == Intersection ? GL_BACK : GL_FRONT);
135 (*j)->render();
136 }
137 glDisable(GL_CULL_FACE);
138 }
139
140 } // namespace OpenGL
141

Callers 4

mergeMethod · 0.85
renderGoldfeatherFunction · 0.85

Calls 4

beginMethod · 0.80
endMethod · 0.80
getOperationMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected