Supported Hardware

Series5, Series5XT, Series6, Series6XE, Series6XT

Valid APIs

OpenGL ES 1.x


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.


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


// Change the stencil operations to decrease and wrap when failing the depth or stencil test, 
// and increase and wrap when succeeding