På Wed, 28 Jun 2006 17:24:27 +0200, skrev Robert Osfield <[EMAIL PROTECTED]>:

void MyRequestCallback::operator()(osg::Node* node, osg::NodeVisitor* nv)
{
     osg::Group* parentGroup = dynamic_cast<osg::Group*>(node);
     if(group)
     {
         osgDB::DatabasePager* databasePager =
osgDB::Registry::instance()->getOrCreateDatabasePager();
         databasePager->requestNodeFile(m_filePath, parentGroup, 0.0,
nv->getFrameStamp());
     }

     traverse(node, nv);
}

?

I guess it'll probably do the trick, I haven't tried anything like
these before though ;-)

Well I have now made a small test app. dbpagerviewer.cpp. It behaves very strange. Have I made a mistake in my code, or is it a bug in osg?

See the two attached diagrams. The diagrams show the framerate and the number of texture objects loaded into video memory. osgviewer.png shows how it looks like when loading a model with 126 different textures with osgViewer.exe. No mystery here.

The dbpager.png diagram, illustrates what happens when I load the same model with the dbpagerviewer test app. When the model appears in the viewer (at the red vertical line) it seems that it is loaded again, and again, and so on.



--
Joakim Simonsson

Attachment: dbpager.png
Description: PNG image

Attachment: osgviewer.png
Description: PNG image

Attachment: dbpagerviewer.cpp
Description: Binary data

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to