iOS stencil buffer

iOS stencil buffer

Both ES1.1 and ES2.0 support stencil operations.

However the availability of a stencil buffer is renderer-dependent. On iPhone OS platforms:

* MBX based devices do not support stencil
* SGX based devices (and the iPhone simulator, in OS 3.x) support stencil in both ES1.1 and ES2.0

Specifically, the ability to use stencil is controlled by the FBO configurations you are allowed to create (because EAGL is entirely FBO-centric.) So if you are able to create a renderbuffer in STENCIL8 or DEPTH24_STENCIL8 formats and get a complete FBO with it, stencil works. These capabilities are advertised in the extension string by OES_stencil8 and OES_packed_depth_stencil .

你可能感兴趣的:(buffer)