GL_OES_stencil_wrap¶
Supported Hardware¶
Series5, Series5XT, Series6, Series6XE, Series6XT
Valid APIs¶
OpenGL ES 1.x
Description¶
Core OpenGL ES 1.0 stencil buffers require that when a value is incremented to the maximum value or decreased to the minimum, further operations will clamp that value. However, a number of algorithms use this buffer as a counter, calculating the difference between the total number of increments and the total number of decrements. This extension adds two new stencil operations: INCR_WRAP and DECR_WRAP. These allow the value to wrap round when the value changes and give more flexibility to the stencil buffer.
Note¶
This extension is part of the OpenGL ES 1.x Extension Pack Specification and is core functionality in OpenGL ES 2.0 and 3.0.
Registry Link¶
http://www.khronos.org/registry/gles/extensions/OES/OES_stencil_wrap.txt
Example¶
// Change the stencil operations to decrease and wrap when failing the depth or stencil test,
// and increase and wrap when succeeding
glStencilOp(GL_DECR_WRAP, GL_DECR_WRAP, GL_INCR_WRAP);