Hi all,
What I'm trying to do:
Asynchronous model loading using OSG 2.2
How I'm currently doing it:
I'm trying to use the Database Pager's requestNodeFile.
I created a new node class that I can add (as well as place temporary
objects) that I can add and will stay in the scene.
class DtDelayedModelNode : public osg::Group
{
...
DtDelayedModelNode(const std::string& filename, osgDB::DatabasePager*
pager) : osg::Group()
{
osg::FrameStamp fs;
fs.setFrameNumber(INT_MAX);
pager->requestNodeFile(filename,this,1.0,&fs);
}
...
};
Problems:
#1 Very limited documentation of the Pager class and no example on how
to use it. I've searched the osgusers archive but haven't found
anything too helpful, the 1.x examples don't seem relevant anymore.
#2 Occasional texture corruption. This is difficult to reproduce
however it appears that sometimes the width of the texture is 1px
creating a streaking effect.
#3 Certain actions cause the main app to lock, for example bringing up
the Stats HUD.
Questions:
Is the Database Pager the proper way to be doing this?
Are their any good examples using the Database Pager using OSG 2.x?
What if any calls should I make to the pager around frame() (ie it
doesn't appear that startFrame endFrame are needed, any other calls)?
The value of the frame stamp appears to control deletion of requests. Ie
if I pass in the current frame stamp, the model is actually deleted in
compileGLObjects. Unless I set it to some value in the future (currently
using INT_MAX) I can't guarantee it will load. Could someone explain the
purpose of the framestamp and the proper usage?
Is there anyway to get status feedback while a file loads?
Thanks,
Colin
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org