[osg-users] Render to 3D texture example and questions

Ulrich Hertlein u.hertlein at sandbox.de
Thu May 1 16:55:06 PDT 2008


Quoting hesicong2006 <hesicong2006 at 163.com>:
> I think another way should be possible:
>
> Only one RTT camera, under it there are 256 pieces of slice to render.
> When render Nth slice, change RTT camera's Z index to N. Is it possible
> to use osg::StateSet to do so?

I was actually wondering whether the nvidia demo only renders one or a few
cameras each frame to get to 60 Hz.

What you propose makes sense but not only would you need to change the target Z
slice but also aspects of the scene you're rendering.  Otherwise you get the
same result for each slice which is probably not what you want.

Try attaching an UpdateCallback to setup the slice each frame, I don't think it
can be done in the StateSet.

Cheers,
/ulrich


More information about the osg-users mailing list