Alternative to accum buffer in OpenGL ES?

佐手、 提交于 2019-12-11 23:21:41

问题


Just noticed that Opengl ES 1.0, 1.1, and probably also 2.0 don't have an accum buffer in Android.

I'm missing out on some neat effects like a simple fireworks display and realistic (and fast) clouds.

Any alternatives to the accum buffer? In particular, at least in the fireworks code, it looks like it's used for blending.

UPDATE: after taking a more careful look at the fireworks code, the accum buffer is used to create the trails.


回答1:


You should be able to emulate the accum buffer via render-to-texture and regular blend operations. In short, just make your own accum buffer.

EDIT: Render-to-texture is supported via frame buffer objects as part of OpenGL ES 2.0 and via the GL_OES_FRAMEBUFFER_OBJECT extension for OpenGL ES 1.x.

See OpenGL extensions available on different Android devices for availability of this extension.

If there is no framebuffer object extension available, you could still render to the back buffer and then use glCopyTexImage2D, but this is a little bit slower.



来源:https://stackoverflow.com/questions/8496923/alternative-to-accum-buffer-in-opengl-es

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!