On Sep 17, 2004, at 6:46 AM, r.leboite.pm@birdsinplane.com wrote:
I have read a lot of papers about offscreen rendering using pBuffers. Those all lead to the use of the extension WGL_ARB_render_texture. Which is supported by most of the graphics cards. I can remember that someone told that this extension was not supported by Apple drivers. Well it hasn't the same name but it works. The replacement extension name is: AGLSurfaceTexture. And it work pretty well.
...thanks for the reminder ;-) I've had a very rough time using apple's pBuffer api in various cases, and there also seems to be plenty of card-specific problems, too (fr'example, single context pBuffers work on my old tiBook, but not my brand new powerbook, yet shared contexts seem to have no problem)...
...certainly this is a way to go, but I also looked at the WGL_ARB_render_texture api, and it just seems to expose similar stuff to the APPLE_pixel_buffer extension (strictly speaking, "AGLSurfaceTexture" isn't an extension)...so this opens the door to a presumably easy implementation of what you've done already: I'll be trying that this weekend...
...there is also the normal, non-extension-based method of render to texture that uses glCopyTexImage(), as described in nehe's tutorial 36 "radial blur": I've used this to good effect, and am still not 100% convinced that pBuffers buy us a whole lot of other stuff (especially if we're just sharing a context)...
...your Cg wrapper stuff looks good on the face of it, and I do have Cg installed, so will try that this weekend too...I'm just shy about using it because anything but the simplest shaders seems to produce unusable code for ati cards (they have a bit different structure): however, nvidia is aware of this and seem to be very responsive to fixing it!
thanx, james