开发者

Android OpenGL blending similar to iPhone

开发者 https://www.devze.com 2023-02-17 23:44 出处:网络
I was wondering if Android has anything similar to iPhone\'s kEAGLDrawablePropertyRetainedBacking property.I\'m interested in not calling glClear every fr开发者_开发技巧ame and having the buffer basic

I was wondering if Android has anything similar to iPhone's kEAGLDrawablePropertyRetainedBacking property. I'm interested in not calling glClear every fr开发者_开发技巧ame and having the buffer basically remember the previous buffer's state.


When you create your EGLConfig, use the bit EGL_SWAP_BEHAVIOR_PRESERVED_BIT. Then you can use eglSurfaceAttrib to set EGL_SWAP_BEHAVIOR to EGL_BUFFER_PRESERVED. This will preserve the content of the buffer between two draws.

0

精彩评论

暂无评论...
验证码 换一张
取 消