accumulation buffer in cocoa
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.
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.
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.
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.
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?
Is there any hardware acceleration for accumulation buffers out there?
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.
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.
Please, someone prove me wrong.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Accumulation Buffer | MacFiend | 3 | 2,529 |
Mar 26, 2003 01:39 AM Last Post: MacFiend |
|
| Double Buffer Speeds in Cocoa | psyba | 1 | 3,096 |
Jan 31, 2003 03:03 PM Last Post: OneSadCookie |
|

