OpenGL Distilled
A.5. Stencil
Available since OpenGL version 1.0, stencil is a part of the framebuffer that stores an additional value per fragment (or per sample, if using multisample). OpenGL allows applications to store and modify these values, and either passes or discards fragments based on the result of the stencil-test operation. Stencil is an extremely flexible feature with several applications, including rendering co-planar primitives and concave polygons, shadow volumes, nonrectangular screen space clipping, and computational solid geometry (CSG), just to name a few. Describing its use is outside the scope of this book. For more information on stencil, see Chapter 10, "The Framebuffer," and Chapter 14, "Now That You Know," of OpenGL® Programming Guide. |
Категории