Skip to main content
gamedev.net
🔒 Locked

OGRE Runtime Failure

Started by TRYCORP 1 reply 1.4k views
Original Post
TRYCORP
TRYCORP
I just started with Ogre, I can compile and run all of the samples, and started working on the tutorials. The code will compile and run with the following line: Code:

         mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) );
The code compiles fine, but while the following lines are in the code it fails on execution: Code:
         Entity *ent1 = mSceneMgr->createEntity( "Robot", "robot.mesh" );
         SceneNode *node1 = mSceneMgr->getRootSceneNode()->createChildSceneNode( "RobotNode" );
         node1->attachObject( ent1 );
The tutorial link is: http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_1 It doesn't generate a log unless I remove the last three added lines of code, recompile, and run it. I'm using codeblocks and minGW by the way I can also get at the error report data if I need to look for something. I did notice some references to exceptions.
Lesson Number 4:"Blades don't need reloading."-- The Zombie Survival Guide
Dobbs
Dobbs
You need to include more information. You say it "fails on execution." Fails how? Is there any exception information? You should try stepping through the code in a debugger to figure out exactly where it fails.

One possibility is that Ogre can't find robot.mesh so the subsequent calls fail. Try checking the return value of createEntity, be sure it's returning an actual entity and not NULL.
Saruman
Saruman
Read the log file.. Ogre is quite descriptive and tells you the exact problem.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.