help OpenSceneGraph
I`m starting with openscenegraph. I'm trying a code and when the program execute osgDB::readNodeFile("train.3ds");, the program stop and it show this message "unhandled exception in OSG.exe(kernel32.dll). Microsoft C++ Exception".
Somebody can hep me???????????
The code is:
Somebody can hep me???????????
The code is:
Code:
#include <iostream.h>
#include <osgDB/ReadFile>
#include <osgDB/Registry>
#include <osgUtil/optimizer>
#include <osgProducer/Viewer>
#include <osg/CoordinateSystemNode>
int main (int argc, char* argv[])
{
osgProducer::Viewer viewer;
viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);
osg::ref_ptr<osg::Node> loadModel =[b][i][u]osgDB::readNodeFile("train.3ds");[/u][/i][/b]
if (!loadModel)
{
printf("\r\nError\r\n");
exit(0);
}
viewer.setSceneData (loadModel.get());
osgUtil::Optimizer optOSGFile;
optOSGFile.optimize (loadModel.get());
viewer.realize();
while(!viewer.done())
{
viewer.sync();
viewer.update();
viewer.frame();
}
viewer.sync();
return true;
}
Have you tried compiling and running it on your mac?
Sir, e^iπ + 1 = 0, hence God exists; reply!
unknown Wrote:Have you tried compiling and running it on your mac?Unkown, you have a sense of humor after all! I'm impressed.
I`m running the proyect in VC++ 6.0 and Visual 2005 and the problem is the same. I`m trying other codes of internet and the problem is the same too. I dont´t find the error and don`t know what can I do.
All codes compiling and running but don´t work when execute any method of the class osgDB.
Any other idea???
All codes compiling and running but don´t work when execute any method of the class osgDB.
Any other idea???
Try posting on a Windows forum where there are other people using Visual C++ and the other technologies you mention. This is a Mac forum.
Speaking for myself, I (like your code) also take exception to Microsoft C++.
Speaking for myself, I (like your code) also take exception to Microsoft C++.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenSceneGraph | Nick | 5 | 6,665 |
Feb 2, 2006 10:46 PM Last Post: kelvin |
|

