Hello Phummipat,
I am very new in openscenegraph, I just want to know how to use
MergeGeometryVisitor & TextureAtlasBuilder for improving my scenegraph.
Could someone give me please an explanation and the example of source
code for using these two classes.
You can in fact use them without writing any code. Just set the
OSG_OPTIMIZER emvironment variable to
MERGE_GEOMETRY|TEXTURE_ATLAS_BUILDER and run
osgconv infile outfile
For example osgconv somemodelfile.osg optimizedfile.ive
You may want to experiment with other optimizer options, run osgconv
--help-env to see all the available options.
This will also embed the textures into the .ive file, and .ive is a more
efficient binary format which loads quickly. OSG SVN trunk also has the
.osgb format which is even better.
If you want to write your own optimizing program, though, look at the
source for the osgUtil::Optimizer to learn how to use the
MergeGeometryVisitor and TextureAtlasBuilder.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org