Code: Select all
// patent-free work around
if (!external)
{
// "preload" the stencil buffer with the number of volumes
// that get clipped by the near or far clip plane
qglStencilOp (GL_KEEP, tr.stencilDecr, tr.stencilDecr);
GL_Cull (CT_FRONT_SIDED);
RB_DrawShadowElementsWithCounters (tri, numIndexes);
qglStencilOp (GL_KEEP, tr.stencilIncr, tr.stencilIncr);
GL_Cull (CT_BACK_SIDED);
RB_DrawShadowElementsWithCounters (tri, numIndexes);
}
Interesting that huge chunks of the console code are almost unchanged from Quake.