#include <Producer/RenderSurface>
#include <osg/Timer>
#include <osgUtil/SceneView>
#include <osgDB/ReadFile>


int main( int argc, char **argv )
{
   // load the scene.
   osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("test.dae");
   if (!loadedModel)
   {
       std::cout << argv[0] <<": No data loaded." << std::endl;
       return 1;
   }

This code throws a bad_alloc exception on the readNodeFile call. I believe
it has something to do with the fact that I am attempting to load in a dae
file, but it gives me this same error, regardless of if the file exists or
not. I'm sure that I am just doing something stupid here... could you please
point me in the right direction. (also when I change the extension I get a
memory access error as though I was referencing a null pointer.

--
"It is only necessary to make war with five things: with the maladies of the
body, with the ignorances of the mind, with the passions of the body, with
the seditions of the city, with the discords of families." - Tacitus

"The desire for safety stands against every great and noble enterprise." -
Tacitus

"Those who would give up essential liberty to purchase a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to