nanolucas
09-09-2008 06:40:13
Hi there,
I've been using OgreNewt for a little while now but i can't figure out how to load a .scene file into it.
Can someone provide me with a very basic project that contains all the code i need to get a .scene loaded in?
I tried using OgreMax within the Demo01_TheBasics project with the following code:
But all it does is close itself and in the log it says a viewport already exists at z-0.
If i change that last line to:
then it doesn't give the z-0 error, but it just crashes when it gets to 'initialising OIS'.
Is there a simpler way than using OgreMax? Or can someone provide me with an example project using OgreMax?
Any help is really appreciated.
I've been using OgreNewt for a little while now but i can't figure out how to load a .scene file into it.
Can someone provide me with a very basic project that contains all the code i need to get a .scene loaded in?
I tried using OgreMax within the Demo01_TheBasics project with the following code:
OgreMax::OgreMaxScene* Ogremax_Scene = NULL;
Ogremax_Scene = new OgreMax::OgreMaxScene ();
LogManager::getSingleton().logMessage("Loading scene...");
Ogremax_Scene->Load("freeway/freeway.scene", mRoot->getAutoCreatedWindow());
mSceneMgr = Ogremax_Scene->GetSceneManager ();
cam = mSceneMgr->getCamera("mainCam");
cam->setPosition(90.0f, 280.0f, 535.0f);
cam->setNearClipDistance(5);
Viewport *vp = mRoot->getAutoCreatedWindow()->addViewport(cam);
But all it does is close itself and in the log it says a viewport already exists at z-0.
If i change that last line to:
Viewport *vp = mRoot->getAutoCreatedWindow()->addViewport(cam, 1, 0, 0, 1.0f / 3.0f, 1);
then it doesn't give the z-0 error, but it just crashes when it gets to 'initialising OIS'.
Is there a simpler way than using OgreMax? Or can someone provide me with an example project using OgreMax?
Any help is really appreciated.