accumulation buffer in cocoa

honkFactory
Unregistered
 
Post: #1
Howdy,
I was wondering how you turn on the accumulation buffer when programming in cocoa. I am just altering a nehe cocoa tutorial and would like to fool around with depth of field and motion blur using the accum buffer but I am not sure how to activate it.
Thanks
Alex
PS when I say "turn on" I really mean initialize.
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #2
To get an accumulation buffer, add NSOpenGLPFAAccumSize to your pixel format, either programatically or in IB. It's just like requesting a depth buffer.

Apple's "AccumSample" sample code showing how to use the accumulation buffer is no longer available on the ADC site but you can get it from this mirror.
Quote this message in a reply
honkFactory
Unregistered
 
Post: #3
Thanks. It was really easy; I just didn't know where to look. I see now why people are not falling all over themselves to use the accumulation bugger. I implimented a simple depth of field effect and FPS drop through the floor. Oh well. It would make a nice static effect for a paused game.

Is there any hardware acceleration for accumulation buffers out there?
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #4
New hardware (gf5200+, Radeon9600+) supports hw-accelerated accumulation on the PC, but not on the Mac (yet). You should be able to use float textures + a simple fragment program to do DOF type accumulation, though. Older hardware has no support for accelerated accumulation, so it is always slow.
Quote this message in a reply
Member
Posts: 68
Joined: 2005.09
Post: #5
yeah I just gave this a try, and rediscovered how frusteratingly slow the accum buffer is. Never have I tried to use a feature short of subpatching half a million polys in lightwave and recieved such a performance hit! My verdict: Until the accum buffer becomes a hw ac. norm for most people, accumulation buffers are cool in theory and suck in practice.

Please, someone prove me wrong.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Accumulation Buffer MacFiend 3 2,842 Mar 26, 2003 01:39 AM
Last Post: MacFiend
  Double Buffer Speeds in Cocoa psyba 1 3,397 Jan 31, 2003 03:03 PM
Last Post: OneSadCookie