Hi Robert,

       Thank you very much for helping me trace the problem. I will later
check the material parameters according to what you indicate. Now I concern
about another issue.  Suppose that I got an quite large model file and need
to load it into OSG. Usually the model file is so big that it will take
dozen of seconds to load. How can I quickly load the model file without
waiting too long, thus users can have a good experience. Now my conclusion
is to split the large model into smaller ones to decrease the loading time.
If this solution is adopted, I also need to implement view update callback
to dynamically load smaller model files according to current view range. So
please give me some advice how to implement my goal? 

 

Glen

 

 

发件人: osg-users [mailto:[email protected]] 代表
Robert Osfield
发送时间: 2014年8月26日 17:02
收件人: OpenSceneGraph Users
主题: Re: [osg-users] OSGEarth crash when loading large amount of data

 

HI Glen,

 

Thanks for posting the model.  The mailing list rejects messages that are
larger than 300k so it won't have made it through to the list.  I get all
bounced messages as I'm the mailing list admin.  I had a quite look at the
model - it loads fine with my osgviewer but I get the message:

Warning: detected OpenGL error 'invalid value' at after RenderBin::draw(..)

Send to the console, and performance is pretty low with the draw dispatch
and GPU draw time both quite large for a relatively modest model size.  The
OpenGL error will be from a setting somewhere in the scene graph that is
invalid,  OpenGL errors cause performance problems so it's difficult to know
what to interpret from the performance issues until the error is fixed.
Unfortunately I don't have enough information from this simple test as to
what the erroneous setting might be, but it there is reasonable chance that
this error is causing the crash on your system, while my OpenGL driver is
able catch the error and report it without doing further damage.  

I am using svn/trunk version of the OSG on Kubuntu 14.04 on an Intel+Geforce
760 GTX system with NVidia drivers.

 

One way of pinpointing the error better is to enable fine grained error
checking in the osg::State by setting the env OSG_GL_ERROR_CHECKING to ON,
on my Linux system this is:

 

   export OSG_GL_ERROR_CHECKING=ON

I don't know what the best way to do it is with VisualStudio though - it's
over a decade since I used it.  

When I enabled the fine grained error checking I go the warning:

   Warning: detected OpenGL error 'invalid value' after applying attribute
Material 0x29638c0

Which strongly suggests that one of the osg::Material in the scene graph has
an erroneous value in it, which one I can't comment on. The best thing you
could do would be to load the scene graph and then write a custom
NodeVisitor that traverses through the scene graph to fine all the
osg::Material and check their values to see if they are sensible.


Robert.

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to