Accumulation Buffer

Member
Posts: 148
Joined: 2003.03
Post: #1
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?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
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.
Quote this message in a reply
Member
Posts: 177
Joined: 2002.08
Post: #3
3Dfx's "T-buffer" on the Voodoo4 and 5was a hardware-accelerated accumulation buffer, but it never took off.
Quote this message in a reply
Member
Posts: 148
Joined: 2003.03
Post: #4
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  accumulation buffer in cocoa honkFactory 4 3,735 Oct 24, 2005 09:54 AM
Last Post: dfmoore