| 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 |
no test coverage detected