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.
精彩评论