【发布时间】:2014-07-19 12:46:55
【问题描述】:
我正在学习 OpenGL ES2.0。我的项目中需要一个模板缓冲区。
What I am going to do:
1) Create a stencil buffer.
2) Load a 8-bit gray color image into this stencil buffer (which is also 8-bit per pixel).
3) The gray color image has different area (by setting different part a different value), so I can render for each area by changing the stencil test value.
找了很久,还是不知道怎么把图片加载到stencil buffer中。
所以对于上图,我将蓝色区域的模板值设置为 1,将绿色区域设置为 2。如何实现?
【问题讨论】:
标签: opengl-es