PDA

View Full Version : Accumulation Buffer


MacFiend
2003.03.25, 06:16 PM
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.


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);


Should that work or is there something I'm missing something?

OneSadCookie
2003.03.25, 06:52 PM
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.

Mark Levin
2003.03.25, 11:51 PM
3Dfx's "T-buffer" on the Voodoo4 and 5was a hardware-accelerated accumulation buffer, but it never took off.

MacFiend
2003.03.26, 04:39 AM
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.