Micah Heyer wrote on Monday, December 17, 2007 12:54 PM: > Hi, > thanks for you reply.I'm afraid my knowledge of osg internals is quite > limited but I will look into it and see if I can understand renderbins > and what ever else. > I'm currently trying to implement the my second method.I looked at the > source for CullVisitor I was wondering is there any reason to subclass > my BSPTreeNode from osg::Group > instead of osg::Node?Node already has a virtual traverse method and > doesn't implement any sort of list to store its children in, so I > wouldn't have redundant references to all the children.
You can use osg::Node just fine if you don't need the children functionality that Group adds. The tricky part with using Group or Node is that you can't just make OpenGL calls; the CullVisitor is not necessarily operating in a valid OpenGL context. The CullVisitor arranges RenderBins and attaches RenderLeafs to them so that the draw pass (which does have an OpenGL context) does all the rendering. Each RenderLeaf has one of the Drawables from the scenegraph and calls draw() on the Drawable when it is time to render (after setting up the appropriate OpenGL state). I hope I'm not scaring you too much. It can be done, but there's a lot of complexity in there that you need to understand to make things work right. -- Bryan Thrall FlightSafety International [EMAIL PROTECTED] _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

