Another v.1.0.0 conversion problem

Problems building or running the engine, queries about how to use features etc.
Post Reply
Rhone
Kobold
Posts: 27
Joined: Wed Aug 25, 2004 10:37 pm

Another v.1.0.0 conversion problem

Post by Rhone »

Alright this is another really basic problem, but it's got me stumped once again. I've converted to 1.0.0, and it compiles and runs. However, my application can no longer locate any of my resources. I have not changed the contents of my data folder at all, and I copied the directories from my old Resources.cfg file into the new one (which I copied from the Ogre samples folder), so the directories it references do indeed exist. Is there something else that's changed about resource loading that I'm missing?
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

Do you have your paths under the 'General' resource group, like this?

Code: Select all

[General]
FileSystem=../../../Media
For the resources to load on startup they should be in 'General'.
Rhone
Kobold
Posts: 27
Joined: Wed Aug 25, 2004 10:37 pm

Post by Rhone »

Yes the [General] is there just as in the samle config file. I've tried hardcoding the entire path instead of using relative paths just to make sure the given paths are correct and it's still not working.

Now to clarify what I said earlier, the [Bootstrap] zip path seems to have worked fine. If I put in an invalid path for the OgreCore.zip, the application crashes elsewhere. The first piece of data it cannot seem to find is a material script, specifically one for my skybox.

Error #: 4
Function: SceneManager::setSkyBox
Description: Sky box material 'Backgrounds/SanAmalga' not found
File: OgreSceneManager.cpp Line: 1074
tisba
Kobold
Posts: 37
Joined: Sun Jan 26, 2003 1:17 am
Location: France (Paris)

Post by tisba »

Did you call ResourceGroupManager::initialiseAllResourceGroups as indicated in the porting notes ?

--tisba
Rhone
Kobold
Posts: 27
Joined: Wed Aug 25, 2004 10:37 pm

Post by Rhone »

I had indeed missed that. Sadly, though, the addition of the "initialiseAllResourceGroups" only changed the error I got when running. Now it throws an exception looking for the trebucbd.ttf font in the "Bootstrap" group. However, I have the fonts folder under the "General" group (as it is also done in the Ogre samples.) Here is my config file:

Code: Select all

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../data/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=../Data
FileSystem=../Data/fonts
FileSystem=../Data/materials/programs
FileSystem=../Data/materials/scripts
FileSystem=../Data/materials/textures
FileSystem=../Data/models
FileSystem=../Data/overlays
FileSystem=../Data/particle
Zip=../Data/packs/cubemap.zip
Zip=../Data/packs/cubemapsJS.zip
Zip=../Data/packs/dragon.zip
Zip=../Data/packs/fresneldemo.zip
Zip=../Data/packs/ogretestmap.zip
Zip=../Data/packs/skybox.zip
Anyone see a problem here?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

That font is in the OgreCore.zip. Are you on Linux/Mac, because I notice the case on 'data' is different to elsewhere ('Data').
Rhone
Kobold
Posts: 27
Joined: Wed Aug 25, 2004 10:37 pm

Post by Rhone »

Well, I've now got the application to compile and start in debug mode at least, but I am still getting a crash, and now it is looking for a different font, "font_matisse_itc.png" which is also in my fonts folder already. The crash happens accessing the SharedPtr<Ogre::Texture>::operator->() with a NULL texture. This was called from TextAreaOverlayElement::setFontName( const String& font ) where the font parameter is "Ogre". All this is happening inside the ResourceGroupManager::initialiseAllResourceGroups(void) call that I've placed in my intialization code. I am calling this, however, after I've parsed the resources.cfg file, so it should know where to find that font.

Sorry for bugging you with stupid errors, but my application was fairly large before I started this port and I'm not sure where to look to solve these problems.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

The texture-based font problem has already been reported and fixed, it will be fine in the 1.0.0 final which is released tonight.
User avatar
Wooden
Halfling
Posts: 58
Joined: Thu Feb 10, 2005 10:35 pm
Location: Arcachon, France
Contact:

Post by Wooden »

tonight? cool, is the file is called 1.0.0 and not 1.0.0RC1 (ogre-win32-v1-0-0.zip) in sourceforge the final release ? there's a changelog in it sayingv
1.0.0 Final [Azathoth] (21 February 2005) - Major Release
was it scheduled for this date?

edit apparently, yes now it's the SDK's that just appeared
Rhone
Kobold
Posts: 27
Joined: Wed Aug 25, 2004 10:37 pm

Post by Rhone »

Alright, a new one now. I've upgraded to v. 1.0.0 final, and it compiles, links and runs. But it throws this exception:

Code: Select all

Error #:7
Function: OverlayManager::createOverlayElement   (And this seems strange since in the code this exception is generated in createOverlayElementFromFactory not createOverlayElement)
Description: Cannot locate factory for element type List
File: ogreoverlaymanager.cpp
Line 658
Again I've no idea what this means. Can anyone help?
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

Element type 'List' is a leftover from the old GUI in pre 1.0.0 versions of Ogre. If you actually use lists, you may consider porting to CEGUI, as the old Ogre GUI is no longer supported; only the static overlay elements survived. The function name in the exception may be a C&P error.
Rhone
Kobold
Posts: 27
Joined: Wed Aug 25, 2004 10:37 pm

Post by Rhone »

I guess I had an old overlay hanging around from my v0.15 application. I deleted them and fixed this. My application runs, and though I've changed nothing except the Ogre3d version conversion, I'm getting ~2fps in debug mode instead of ~15fps. I'm going to look into this more to see if I can find out what is ruining the framerate.
Post Reply