Tutorial Pack 2 problem: "choseSceneManager" screw
-
EGD Eric
- Halfling
- Posts: 41
- Joined: Mon Dec 13, 2004 4:07 pm
- Location: St. Bruno, Quebec, Canada
Tutorial Pack 2 problem: "choseSceneManager" screw
I just started Xorexis's tutorial pack 2, the one where you make a simple flight game, and I'm supposed to change the scene manager type. So in the tutorial, it says to overload ExampleApplication's chooseSceneManager function, so that it uses an outdoor scene manager instead.
void TutorialApplication::chooseSceneManager()
{
mSceneMgr = mRoot->getSceneManager(ST_EXTERIOR_CLOSE);
}
So anyway, I put this in, and it crashes. The game goes to black and I can't exit without task manager. If I comment the code out, the game goes back to normal. Has anyone done this tutorial and run into the same problem?
void TutorialApplication::chooseSceneManager()
{
mSceneMgr = mRoot->getSceneManager(ST_EXTERIOR_CLOSE);
}
So anyway, I put this in, and it crashes. The game goes to black and I can't exit without task manager. If I comment the code out, the game goes back to normal. Has anyone done this tutorial and run into the same problem?
-
dorvo
- Halfling
- Posts: 68
- Joined: Tue Nov 02, 2004 8:01 pm
What version of Ogre are you using?
Something you might want to try is this:
Something you might want to try is this:
Code: Select all
mSceneMgr = mRoot->getSingletonPtr()->getSceneManager(ST_EXTERIOR_CLOSE);
-
EGD Eric
- Halfling
- Posts: 41
- Joined: Mon Dec 13, 2004 4:07 pm
- Location: St. Bruno, Quebec, Canada
I tried what you said, and I still get the same result. I'm not sure what version of Ogre I have. I downloaded it about 2 months ago. I'll go see if I can update it.
Edit: I notice that version 1.0.0 requires STL port even for VS.net 2003. I have STLport ready to install, but I forget how I'm supposed to install it. I remember reading some instructions for it, but I don't remember where those are. I can't even find the download for it anymore. Is it contained in the "precompiled 3rd part libraries"?
Another question: When upgrading to v 1.0, I'll be downloading a whole folder of source and rebuilding the libraries like I did in the first tutorial then?
Then after that I'll just move any projects I have in the old OgreNew folder to the new one?
Edit: I notice that version 1.0.0 requires STL port even for VS.net 2003. I have STLport ready to install, but I forget how I'm supposed to install it. I remember reading some instructions for it, but I don't remember where those are. I can't even find the download for it anymore. Is it contained in the "precompiled 3rd part libraries"?
Another question: When upgrading to v 1.0, I'll be downloading a whole folder of source and rebuilding the libraries like I did in the first tutorial then?
Then after that I'll just move any projects I have in the old OgreNew folder to the new one?
- johnhpus
- Platinum Sponsor

- Posts: 1186
- Joined: Sat Apr 17, 2004 2:49 am
- x 3
Just checked with Wumpus, no, STLPort is not required for VC 7.1 ( VS 2003 )
Yes, just create a new folder for RC1 and extract ( or cvs ) the new Ogre into that and compile as usual. Some changes have been made that you'll need to address before your old Ogre projects will compile with Azathoth. Check out the Ogre Wiki for instructions on updating to Azathoth: http://ogrewiki.digitalsentience.com/in ... /Main_Page
And finally a quick guess on the SceneManager problem. Are you sure that you've succesfully compiled the dll for the SceneManager your trying to use?
John
Yes, just create a new folder for RC1 and extract ( or cvs ) the new Ogre into that and compile as usual. Some changes have been made that you'll need to address before your old Ogre projects will compile with Azathoth. Check out the Ogre Wiki for instructions on updating to Azathoth: http://ogrewiki.digitalsentience.com/in ... /Main_Page
And finally a quick guess on the SceneManager problem. Are you sure that you've succesfully compiled the dll for the SceneManager your trying to use?
John
-
dorvo
- Halfling
- Posts: 68
- Joined: Tue Nov 02, 2004 8:01 pm
Does v1.0.0 need STLPort for VS.NET 2003?
I was able to compile and run everything without using STLPort.
You may want to check out the notes on v1.0.0.
Azathoth Notes
I was able to compile and run everything without using STLPort.
You may want to check out the notes on v1.0.0.
Azathoth Notes
-
EGD Eric
- Halfling
- Posts: 41
- Joined: Mon Dec 13, 2004 4:07 pm
- Location: St. Bruno, Quebec, Canada
I remember it saying something about version 1.0 needing STLPort for VS.net 1.1, I could have misread it, I'll check it all out when I upgrade.You may want to check out the notes on v1.0.0.
And finally a quick guess on the SceneManager problem. Are you sure that you've succesfully compiled the dll for the SceneManager your trying to use?
How do I compile a dll?
Edit: I can't seem to be able to access the wiki at this time, anyone else have this problem?
-
dorvo
- Halfling
- Posts: 68
- Joined: Tue Nov 02, 2004 8:01 pm
I don't think it's required for v1.0 and VS.NET 2003. I compiled the engine perfectly fine without STLPort.EGD Eric wrote: I remember it saying something about version 1.0 needing STLPort for VS.net 1.1, I could have misread it, I'll check it all out when I upgrade.
If you're using the SceneManagers that come with Ogre, they should automatically compile when you build the engine. However, if you're using one of the SceneManagers from the AddOns, you'll have to compile those separately. I've never compiled those, so I'm not sure what's involved.How do I compile a dll?
Edit: I can't seem to be able to access the wiki at this time, anyone else have this problem?
Yeah, it would appear that the wiki wasn't working earlier today.
- Emmeran
- Goblin
- Posts: 272
- Joined: Wed Jun 02, 2004 11:47 am
- Location: Erlangen
- Contact:
-
EGD Eric
- Halfling
- Posts: 41
- Joined: Mon Dec 13, 2004 4:07 pm
- Location: St. Bruno, Quebec, Canada
22:51:05: Unloading library .\RenderSystem_Direct3D9
22:51:06: *-*-* Direct3D Subsystem shutting down cleanly.
22:51:06: Direct3D7 Rendering Subsystem destroyed.
22:51:06: Unloading library .\RenderSystem_Direct3D7
22:51:06: Unloading library OgrePlatform.dll
hmm.. I see nothing of relevance here. I'll try upgrading to v1.0.
22:51:06: *-*-* Direct3D Subsystem shutting down cleanly.
22:51:06: Direct3D7 Rendering Subsystem destroyed.
22:51:06: Unloading library .\RenderSystem_Direct3D7
22:51:06: Unloading library OgrePlatform.dll
hmm.. I see nothing of relevance here. I'll try upgrading to v1.0.
- Emmeran
- Goblin
- Posts: 272
- Joined: Wed Jun 02, 2004 11:47 am
- Location: Erlangen
- Contact:
-
EGD Eric
- Halfling
- Posts: 41
- Joined: Mon Dec 13, 2004 4:07 pm
- Location: St. Bruno, Quebec, Canada
You know how I said that the program would freeze up, and I'd have to use task manager to get out? Now, if I write this code:
mSceneMgr->setWorldGeometry("terrain.cfg");
It instead throws an exeption. The exception is as follows:
12:36:44: An exception has been thrown!
-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: TerrainSceneManager::loadConfig
Description: Missing option 'PageSize'.
File: c:\documents and settings\eric cote\my documents\schoolwork\product development\ogrenew\plugins\octreescenemanager\src\ogreterrainscenemanager.cpp
Line: 112
I don't have anything in that directory that's listed. I originally had the Ogre folder called: Ogrenew somwhere in a directory called: "Product development", but then when I got to the Xorexis tutorial packs, the tutorial gave the instructions to change the directories around, make it so that you have a directory:
OgreTutorials
and another:
OgreTutorials\OgreNew
and some other ones in OgreTutorials for the bin and common folders.
Does Ogre "remember" where it was when I first built the libraries? Should I build them again?
Anyway, I'll try using the upgraded version of Ogre, I'll get back to you on how that works out.
mSceneMgr->setWorldGeometry("terrain.cfg");
It instead throws an exeption. The exception is as follows:
12:36:44: An exception has been thrown!
-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: TerrainSceneManager::loadConfig
Description: Missing option 'PageSize'.
File: c:\documents and settings\eric cote\my documents\schoolwork\product development\ogrenew\plugins\octreescenemanager\src\ogreterrainscenemanager.cpp
Line: 112
I don't have anything in that directory that's listed. I originally had the Ogre folder called: Ogrenew somwhere in a directory called: "Product development", but then when I got to the Xorexis tutorial packs, the tutorial gave the instructions to change the directories around, make it so that you have a directory:
OgreTutorials
and another:
OgreTutorials\OgreNew
and some other ones in OgreTutorials for the bin and common folders.
Does Ogre "remember" where it was when I first built the libraries? Should I build them again?
Anyway, I'll try using the upgraded version of Ogre, I'll get back to you on how that works out.
- Emmeran
- Goblin
- Posts: 272
- Joined: Wed Jun 02, 2004 11:47 am
- Location: Erlangen
- Contact:
- Clay
- OGRE Community Helper

- Posts: 518
- Joined: Wed Mar 17, 2004 4:14 am
- x 1
- Contact:
-
Jeff
- Gnoblar
- Posts: 17
- Joined: Mon Feb 07, 2005 8:28 pm
Sure, Here's the contents of terrain.cfg
and I'm using Azathoth (v1.0.0)
Code: Select all
WorldTexture=terrain_texture.jpg
DetailTexture=terrain_detail.jpg
DetailTile=3
Terrain=Terrain.png
TileSize-17
MaxPixelError=8
ScaleX=4
ScaleY=1
ScaleZ=4
MaxMipMapLevelLevel=5- Clay
- OGRE Community Helper

- Posts: 518
- Joined: Wed Mar 17, 2004 4:14 am
- x 1
- Contact:
-
EGD Eric
- Halfling
- Posts: 41
- Joined: Mon Dec 13, 2004 4:07 pm
- Location: St. Bruno, Quebec, Canada
my values are the same as his, but I was using a previous version of Ogre when posting this.
Now that I try the same program (minus the ChooseSceneManager change) in Azathoth, I get this error message when running it (no build errors) that says that it can't find OgreMain_d.dll. Is there some setting in Visual Studio that you've got to set for the directories of Dlls? I've only ever set directories for includes and libs.
Now that I try the same program (minus the ChooseSceneManager change) in Azathoth, I get this error message when running it (no build errors) that says that it can't find OgreMain_d.dll. Is there some setting in Visual Studio that you've got to set for the directories of Dlls? I've only ever set directories for includes and libs.
Last edited by EGD Eric on Mon Feb 14, 2005 11:44 pm, edited 1 time in total.
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
That's an old format terrain.cfg, compatible with 0.14.x or before but nothing after that. The terrain.cfg changed in 0.15.x, so you're a little out of date! The trouble with user-contributed tutorials is that they get out of date. Here's the new format in Samples\Common\bin\Debug|Release:
Code: Select all
# The main world texture (if you wish the terrain manager to create a material for you)
WorldTexture=terrain_texture.jpg
# The detail texture (if you wish the terrain manager to create a material for you)
DetailTexture=terrain_detail.jpg
#number of times the detail texture will tile in a terrain tile
DetailTile=3
# Heightmap source
PageSource=Heightmap
# Heightmap-source specific settings
Heightmap.image=terrain.png
# If you use RAW, fill in the below too
# RAW-specific setting - size (horizontal/vertical)
#Heightmap.raw.size=513
# RAW-specific setting - bytes per pixel (1 = 8bit, 2=16bit)
#Heightmap.raw.bpp=2
# Use this if you want to flip the terrain (eg Terragen exports raw upside down)
#Heightmap.flip=true
# How large is a page of tiles (in vertices)? Must be (2^n)+1
PageSize=513
# How large is each tile? Must be (2^n)+1 and be smaller than PageSize
TileSize=65
# The maximum error allowed when determining which LOD to use
MaxPixelError=3
# The size of a terrain page, in world units
PageWorldX=1500
PageWorldZ=1500
# Maximum height of the terrain
MaxHeight=100
# Upper LOD limit
MaxMipMapLevel=5
#VertexNormals=yes
#VertexColors=yes
#UseTriStrips=yes
# Use vertex program to morph LODs, if available
VertexProgramMorph=yes
# The proportional distance range at which the LOD morph starts to take effect
# This is as a proportion of the distance between the current LODs effective range,
# and the effective range of the next lower LOD
LODMorphStart=0.2
# This following section is for if you want to provide your own terrain shading routine
# Note that since you define your textures within the material this makes the
# WorldTexture and DetailTexture settings redundant
# The name of the vertex program parameter you wish to bind the morph LOD factor to
# this is 0 when there is no adjustment (highest) to 1 when the morph takes it completely
# to the same position as the next lower LOD
# USE THIS IF YOU USE HIGH-LEVEL VERTEX PROGRAMS WITH LOD MORPHING
#MorphLODFactorParamName=morphFactor
# The index of the vertex program parameter you wish to bind the morph LOD factor to
# this is 0 when there is no adjustment (highest) to 1 when the morph takes it completely
# to the same position as the next lower LOD
# USE THIS IF YOU USE ASSEMBLER VERTEX PROGRAMS WITH LOD MORPHING
#MorphLODFactorParamIndex=4
# The name of the material you will define to shade the terrain
#CustomMaterialName=TestTerrainMaterial
- DWORD
- OGRE Retired Moderator

- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
- Contact:
For an attempt to documentation of the 'terrain.cfg' file see: Docs on format of terrain.cfg? where I try to explain the meaning of the different properties.