iDevGames Forums

Full Version: Accumulation Buffer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I got this from the OpenGL Red Book. It supposedly allows for antialiasing/motion blur and whatnot. However it doesn't seem to work for me.

[sourcecode]
glClear(GL_ACCUM_BUFFER_BIT);
for(..however many times)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
..draw scene at different positions..
glAccum(GL_ACCUM, 1.0/ACSIZE);
}
glAccum (GL_RETURN, 1.0);
[/sourcecode]

Should that work or is there something I'm missing something?
You probably need to request an accumulation buffer in your pixel format / display flags / whatever.

Accumulation buffers are not hardware-accelerated by any current video cards, so it will be painfully slow even if you can make it work.
3Dfx's "T-buffer" on the Voodoo4 and 5was a hardware-accelerated accumulation buffer, but it never took off.
You were right OneSadCookie. I did need to include AccumSize in my pixel format. It works, but like you said, it is ridiculously slow...so scratch that. Thanks anyhow.
Reference URL's