Hi Charlse, On Nov 28, 2007 3:40 AM, ZHOUXIAO HAN <[EMAIL PROTECTED]> wrote: > Does anybody know how to config OSG to preload all ive models before > rendering a scene? > I have a large set of IVE models in my application and everytime when a > model is going to be rendered the app freezes for a few sec to resize all > textures to the power of 2. Is there anyway to get around it?
The osgViewer::Viewer automatically runs a compile traversal on the first frame when an app is run, but this will only help if you set the scene data before the viewer is realized (as done in the osgviewer example.) If you are loaded your data after the window is realized you'll need to do a compile traversal after loading the data - the include/osgUtil/GLObjectsVisitor can be used for this purpose - but it must be called by the graphics thread for each window open, using an osg::Camera pre draw callback would probably be the easiest way to do this. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

