Jim Wilson writes: > Yes it sure is strange. When David moved it to the main scene graph that > fixed the problem, and just about eliminated the z-fighting between model > objects. When I get a chance I'm going to take a look at sgCullandDraw() and > the ssg source, just out of curiosity.
There's nothing magic about ssgCullAndDraw() ... it just traverses the scene graph and dumps out the corresponding opengl draw commands: do_needed_changes(); glBegin(); do_opengl_draw_commands(); glEnd(); repeat for each leaf node. There is really no performance hit with using multiple ssgRoots. The only thing slightly tricky is that each leaf node in the scene graph can have an ssgSimpleState attached and ssg does 'lazy' state changes. In otherwords, ssg keeps track of the current opengl states and when a new ssgSimpleState is applied, it only changes the items that are different from the previous state. OpenGL state change can get expensive, so minimizing it can be a big performance win. As long as you understand what's going on inside of ssg (which is pretty straightforward) it is not difficult to mix ssg drawing with your own raw opengl drawing. The biggest thing to watch out for is 'state' management. If you change state outside of ssg's state changing mechanism, then you can throw ssg out of sync so it might not set a state it needs to and you can get your ssg rendered stuff screwed up. Regards, Curt. -- Curtis Olson IVLab / HumanFIRST Program FlightGear Project Twin Cities [EMAIL PROTECTED] [EMAIL PROTECTED] Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel