i´ll check your prj settings Chris, once again thx for your help
From: "David _" <[EMAIL PROTECTED]>
Reply-To: osg users <[email protected]>
To: [email protected]
Subject: Re: [osg-users] exception fault with readnodefile
Date: Tue, 22 May 2007 16:05:26 +0200
Hi again, i´m working now with an example from the osg quickstart guide. It´s a really easy example and i´ve not written anything myself, just copied from the example, and again i´m having an exception fault with this line, being root a valid node previously filled with geometry data
bool result = osgDB::writeNodeFile(*(root.get()), "Simple.osg" );
don´t know if it´s something related to a compilation option or if i´m doing something wrong. The project is made under visual .net win console aplication and everything compile fine using osg1.2 precompiled libs for windows
please, someone help me :(
From: "David _" <[EMAIL PROTECTED]>
Reply-To: osg users <[email protected]>
To: [email protected]
Subject: Re: [osg-users] exception fault with readnodefile
Date: Tue, 22 May 2007 15:29:02 +0200
Hi Chris, thx for answering, but the file path is ok. I put the file in the root folder before posting here to make sure the path was ok and still happens the same
i´ve made a win32 console aplication, included the precompiled head files and libs and trying to do this simple example
// Create a Producer-based viewer
osgProducer::Viewer viewer;
viewer.setUpViewer (osgProducer::Viewer::STANDARD_SETTINGS);
// Load the modelstd::string rp =
"C:\\cow.osg"; //osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(rp);osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(
"c:/cow.osg"); //osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(argv[1]); if (!loadedModel){
std::cerr <<
"Problem opening " << argv[1] << "\n";exit (1);
}
viewer.setSceneData (loadedModel.get());
// Enter rendering loopviewer.realize();
while (!viewer.done()){
// Wait for all cull and draw threads to complete.viewer.sync();
// Update the scene by traversing it with the the update visitor which // will call all node update callbacks and animations.viewer.update();
// Fire off the cull and draw traversals of the scene.viewer.frame();
}
// Wait for all cull and draw threads to complete before exit.viewer.sync();
return 0;
i´ve tried several ways in order to check that the path is ok ("c:\\cow.osg". "c:/cow.osg", etc);, i don´t think that´s the problem, maybe i´m doing something wrong with the visual .net and not setting an option like it should
From: "christophe loustaunau" <[EMAIL PROTECTED]>
Reply-To: osg users <[email protected]>
To: "osg users" <[email protected]>
Subject: Re: [osg-users] exception fault with readnodefile
Date: Tue, 22 May 2007 15:12:08 +0200
Hi david,There is no error with :osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("cow.osg");but make sure you give the good location for cow.osg.I mean :osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(""C:/...../cow.osg");
Hope this help.Christophe.
2007/5/22, David _ <[EMAIL PROTECTED]>:Hi
i´m using 1.2 osg version and trying to load a model from disk under windows
visual .net c++
this line is causing exception fault
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("cow.osg");
i´m receiving this message
-- --Excepción not controlled in 0x7c81eb33 en pruebaosg.exe : Exception of
Microsoft C++:std::bad_alloc in memory position 0x0012f378.. -----
it´s translated from spanish so maybe is not exactly the same message you
should receive in an english enviroment
thx and sorry for my english
_________________________________________________________________
Horóscopo, tarot, numerología... Escucha lo que te dicen los astros.
http://astrocentro.msn.es/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
>_______________________________________________
>osg-users mailing list
>[email protected]
>http://openscenegraph.net/mailman/listinfo/osg-users
>http://www.openscenegraph.org/
Éxitos, grandes clásicos y novedades. Un millón de canciones en MSN Music.
>_______________________________________________
>osg-users mailing list
>[email protected]
>http://openscenegraph.net/mailman/listinfo/osg-users
>http://www.openscenegraph.org/
Acepta el reto MSN Premium: incluye Antivirus y Firewall de McAffee. Descárgalo y pruébalo 2 meses gratis.
>_______________________________________________
>osg-users mailing list
>[email protected]
>http://openscenegraph.net/mailman/listinfo/osg-users
>http://www.openscenegraph.org/
Acepta el reto MSN Premium: incluye Antivirus y Firewall de McAffee. Descárgalo y pruébalo 2 meses gratis.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
