Buckcherry
25-07-2006 11:38:25
Hi everybody,
I have successfully compiled the MapEditor taken from CVS, but making the following changes:
In the MapEditorListener::keyPressed method I have change these lines:
For these ones:
In MapEditor::chooseSceneManager method I have change these lines:
For these ones:
But when I run the program I get the following exception error:
What is wrong?
I have successfully compiled the MapEditor taken from CVS, but making the following changes:
In the MapEditorListener::keyPressed method I have change these lines:
else
{
if (e->getKey() == KC_T)
{
if (mCamera->getDetailLevel() == SDL_SOLID)
{
mCamera->setDetailLevel(SDL_WIREFRAME);
}
else
{
mCamera->setDetailLevel(SDL_SOLID);
}
}
For these ones:
else
{
/* if (e->getKey() == KC_T)
{
if (mCamera->getDetailLevel() == SDL_SOLID)
{
mCamera->setDetailLevel(SDL_WIREFRAME);
}
else
{
mCamera->setDetailLevel(SDL_SOLID);
}
}
*/
printf("");
// Capture the screen to a PNG graphics file
}
In MapEditor::chooseSceneManager method I have change these lines:
void MapEditor::chooseSceneManager(void)
{
mSceneMgr = mRoot->getSceneManager( ST_EXTERIOR_REAL_FAR );
mSceneMgr->setWorldGeometry( "paginglandscape2.cfg" );
mSceneMgr->setAmbientLight(ColourValue(1.0, 1.0, 1.0));
}
For these ones:
void MapEditor::chooseSceneManager(void)
{
mSceneMgr = mRoot->getSceneManager("PagingLandScapeSceneManager2");
mSceneMgr->setWorldGeometry( "paginglandscape2.cfg" );
mSceneMgr->setAmbientLight(ColourValue(1.0, 1.0, 1.0));
}
But when I run the program I get the following exception error:
-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManagerEnumerator::getSceneManager
Description: SceneManager instance with name 'PagingLandScapeSceneManager2' not found..
File: \OgreDev\Dagon\OgreMain\src\OgreSceneManagerEnumerator.cpp
Line: 259
Stack unwinding: <<beginning of stack>>
12:07:32: Unregistering ResourceManager for type BspLevel
12:07:32: *-*-* OGRE Shutdown
12:07:32: Unregistering ResourceManager for type Compositor
12:07:32: Unregistering ResourceManager for type Font
12:07:32: Unregistering ResourceManager for type Skeleton
12:07:32: Unregistering ResourceManager for type Mesh
12:07:32: Unregistering ResourceManager for type HighLevelGpuProgram
12:07:32: Unloading library .\Plugin_PagingLandScapeSceneManager2
12:07:32: Unloading library .\Plugin_CgProgramManager
12:07:32: Unloading library .\Plugin_OctreeSceneManager
12:07:32: Unloading library .\Plugin_BSPSceneManager
12:07:32: Unloading library .\Plugin_ParticleFX
12:07:32: *** Stopping Win32GL Subsystem ***
12:07:32: Unloading library .\RenderSystem_GL
12:07:32: Render Target 'OGRE Render Window' Average FPS: 0 Best FPS: 0 Worst FPS: 999
12:07:33: D3D9 : Shutting down cleanly.
12:07:33: Unregistering ResourceManager for type Texture
12:07:33: Unregistering ResourceManager for type GpuProgram
12:07:33: D3D9 : Direct3D9 Rendering Subsystem destroyed.
12:07:33: Unloading library .\RenderSystem_Direct3D9
12:07:33: Unregistering ResourceManager for type Material
12:07:33: Unloading library OgrePlatform.dll
What is wrong?