Ethan Kerzner wrote:
Hi,
I guess my first question was too vague. Sorry about that. I am still trying to
use transform feedback on an entire scene inside osg.
I have created a CustomDrawable class with a drawImplementation that can
perform transform feedback on anything drawn inside it. I am now trying to draw
the entire scene inside my drawImplementation using a node visitor to traverse
the graph and locate and draw all of the drawables with transform feedback
enabled.
I do not understand the parameters of "void draw(osg::RenderInfo &renderInfo) const" function.
Can you please explain what information RenderInfo contains? Is the RenderInfo
different for each drawable or global for the scene? Is it possible to
determine the RenderInfo of a drawable?
I think you're making this more complex than it needs to be.
If you had a plain OpenGL program, you'd bind a transform feedback buffer before
drawing, do the drawing, then process the buffer's contents after drawing. In
OSG, the way to do pre- and post-draw operations is via Camera callbacks. You
should be able to attach a pre-draw callback that binds a transform feedback
buffer (and creates it if it doesn't already exist, of course), and a post-draw
callback that unbinds the buffer and processes the contents. Any children of the
camera will then "draw" into the transform feedback buffer.
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org