I wanted to follow this up. I looked at the accumulation buffer, but I can't render directly to it--only render somewhere else and add it in.
I've gotten close to something that works (using OpenGL, rather than OSG) by writing stuff in my render bin to GL_AUX1 while setting stencil bits, then copying the results of that buffer (using stencil test) to the back buffer. But even if I get this to work all the way, I'm not sure it is an approach I like. One pass at changing it while keeping the same approach would be to switch my stencil stuff over to OSG. Can I get to the auxiliary buffer there? If I ought to be using FrameBufferObject, please let me know if I can use it without a separate camera, etc, as I asked below. thanks andy ________________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Skinner Sent: Monday, November 27, 2006 4:18 PM To: osg users Subject: [osg-users] FrameBufferObject, or alternative? I'd like some of the objects in my scene tree to not be erased from frame to frame. If I move a small object marked this way across the scene, it'll leave a trail behind it. I'm not sure how to go about it. Last week I was able to separate out objects that I've got marked this way into a separate RenderBin. Now I've got those drawn in a separate renderImplementation() method. I was thinking of using a FrameBufferObject for the things in this RenderBin. I want those things to be drawn into a separate buffer, and that buffer put into the scene every frame. (Maybe there is a better way to do this?) I want the exact same state while drawing this RenderBin except for where the pixels go. So I don't want to set up the camera separately, or change the matrices, etc. The other buffer would be the same size as the normal back buffer, and should just composite on top. I'm looking at runCameraSetup() in RenderStage, and it has some of what I want. But I'm not sure I need to be so general purpose. Can I use FrameBufferObject to just switch where I'm rendering some objects to? thanks andy _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
