|
BranchGroup.compile()Sourced from java3d-interest list. Posted by Doug Gehringer of SunMaking compile() make your scene graph faster Compiling scene graphs can make certain kinds of scene graphs render much more quickly. To take advantage of compile() your scene graph must: have lots of Shape3Ds which share common attributes and transforms, not have indexed geometry, and not have any capability bits or the "pickablity" flag set.
DetailsCompilation is a great unfulfilled promise for most Java3d applications today. The promise is much improved performance, but almost no applications are seeing a performance benefit today. The reasons for this are two-fold: compile() only helps certain kinds of scene graphs and the default flag settings prevent compile() from optimizing the scene graph.Here is how compile() works. Compile implements two optimizations to the scene graph: attribute sorting and shape merging. Attribute sorting looks at the attributes on the Shape3Ds and builds a list of unique appearances. It then replaces the redundant appearances with references to the unique appearances. This minimizes the overhead to changing appearances as the scene graph is displayed.
Note
|
|
[ j3d.org ]
[ Aviatrix3D ]
[ Code Repository ]
[ Java3D ]
[ OpenGL ]
[ Books ]
[ Contact Us ]
Hosted by Yumetech Last Updated: $Date: 2006/04/18 18:20:05 $ |