Introduction to Game Programming - Carnegie Mellon Computer Graphics
OpenGL Stencil Buffer Support To use the stencil buffer: glStencilFunc(GL_EQUAL, // comparison function 0x1, // reference value 0xff); // comparison mask To update the stencil buffer: glStencilOp(GL_KEEP, // stencil fail GL_DECR, // stencil pass, depth fa...