0

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.

genpfault
  • 47,669
  • 9
  • 68
  • 119
U Avalos
  • 5,553
  • 6
  • 38
  • 67

1 Answers1

4

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.

Community
  • 1
  • 1
wolfgang
  • 4,533
  • 18
  • 26
  • Any idea idea if that is supported in Android Opengl ES 1.0, 1.1, or 2.0? – U Avalos Dec 14 '11 at 17:18
  • I have successfully used render-to-texture with depth and color framebuffers with OpenGL ES 2.0 (Android 2.3, Galaxy S). I haven't tried floating point color buffers yet - they might be required to emulate more demanding accum buffer applications, but they are probably not necessary for fireworks trails. – wolfgang Dec 15 '11 at 10:50
  • I'm working with 1.0 and 1.1 right now (which is more supported than 2.0 at the moment). What functions are required? If they're in 1.0 or 1.1, then I'll mark this as the answer. – U Avalos Dec 15 '11 at 15:28
  • Technically, it's the answer to the question I asked. However, I won't be using this technique because its available only as an extension in 1.x---meaning support is likely to be spotty. – U Avalos Dec 16 '11 at 14:21