help OpenSceneGraph

ali_ba82
Unregistered
 
Post: #1
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???????????Wacko

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;
}
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #2
Have you tried compiling and running it on your mac?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 3,574
Joined: 2003.06
Post: #3
unknown Wrote:Have you tried compiling and running it on your mac?
Unkown, you have a sense of humor after all! I'm impressed. LOL
Quote this message in a reply
ali_ba82
Unregistered
 
Post: #4
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???
Quote this message in a reply
Member
Posts: 245
Joined: 2005.11
Post: #5
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++.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenSceneGraph Nick 5 6,868 Feb 2, 2006 10:46 PM
Last Post: kelvin