Section A.5. Stencil


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.




OpenGL Distilled
OpenGL Distilled
ISBN: 0321336798
EAN: 2147483647
Year: 2007
Pages: 123
Authors: Paul Martz

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net