[SOLVED]Cannot locate mesh after compiling

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
gattu_marrudu
Gnoblar
Posts: 16
Joined: Tue Jul 19, 2005 7:27 am
Location: Sardinia, Italy

[SOLVED]Cannot locate mesh after compiling

Post by gattu_marrudu »

I have compiled my first executable with OGRE (on Linux), and all looked fine.
But when I launch the application, after the video mode selection GUI, I get the following error:

Code: Select all

Parsing script OgreLoadingPanel.overlay
Finished parsing scripts for resource group 
Parsing scripts for resource group General
Finished parsing scripts for resource group General
Mesh: Loading ingrao01.mesh.
An exception has occured: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 8
Function: ResourceGroupManager::openResource
Description: Cannot locate resource ingrao01.mesh in resource group General.. 
File: OgreResourceGroupManager.cpp
Line: 499
Stack unwinding: <<beginning of stack>>
*-*-* OGRE Shutdown
etc.

It doesn't seem related to the resources.cfg file, as it points right to the directory where the mesh is. And besides, it seems to load other resources, like bitmaps.

Could it be something missing in my code? I'm using the provided ExampleApplication.h and ExampleFrameListener.h.

These are the lines of the .cpp file which could be interested in the error:

Code: Select all

void createScene(void)
    {
        Entity* thisEntity = mSceneMgr->createEntity("nameInTheScene", "ingrao01.mesh");
        mSceneMgr->setAmbientLight(ColourValue(1, 1, 1));
        SceneNode* thisSceneNode = static_cast<SceneNode*>(mSceneMgr->getRootSceneNode()->createChild());
        thisSceneNode->attachObject(thisEntity);
        thisSceneNode->roll(Degree(90));
        thisSceneNode->yaw(Degree(90));
        mCamera->setPosition(Vector3(0,-200,-600));
        mCamera->lookAt(Vector3(0,-200,500));
    }
Last edited by gattu_marrudu on Fri Jul 22, 2005 12:07 pm, edited 1 time in total.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Cannot locate mesh after compiling

Post by jacmoe »

gattu_marrudu wrote:It doesn't seem related to the resources.cfg file, as it points right to the directory where the mesh is. And besides, it seems to load other resources, like bitmaps.
Well, this does look like it's related to the resources.cfg file.
Did you put that .mesh file in the models directory?
What's written in that resources.cfg of yours?
Even if everything looks right, it could be wrong.

((This is on Linux - so (I could be wrong here) did you set the correct file permissions on your mesh file?))
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
gattu_marrudu
Gnoblar
Posts: 16
Joined: Tue Jul 19, 2005 7:27 am
Location: Sardinia, Italy

Post by gattu_marrudu »

Here is my resources.cfg:

Code: Select all

FileSystem=./
FileSystem=../Media
FileSystem=../Media/fonts
FileSystem=../Media/materials/programs
FileSystem=../Media/materials/scripts
FileSystem=../Media/materials/textures
FileSystem=../Media/models
#FileSystem=../Media/overlays
#FileSystem=../Media/particle
#Zip=../Media/packs/cubemap.zip
#Zip=../Media/packs/cubemapsJS.zip
#Zip=../Media/packs/dragon.zip
#Zip=../Media/packs/fresneldemo.zip
Zip=../Media/packs/OgreCore.zip
#Zip=../Media/packs/ogretestmap.zip
#Zip=../Media/packs/skybox.zip 
The .mesh file and the models folder are created by me and they have all the permissions for their owner (me). I also tried to put a mesh from the samples directory and to add it to the .cpp file, but it cannot be found either.
Another thing: I didn't write the code, but somebody else wrote it for me for OGRE 0.15, now I'm using 1.0.3. As I first tried to compile, it complained about a missing "Plugin_fileSystem", which actually doesn't exist. So I removed its reference in the plugins.cfg:

Code: Select all

# Define plugin folder
PluginFolder=/usr/local/lib/OGRE

# Define plugins
#Plugin=RenderSystem_Direct3D7
#Plugin=RenderSystem_Direct3D9
Plugin=RenderSystem_GL
#Plugin=Plugin_FileSystem
Plugin=Plugin_ParticleFX
Plugin=Plugin_BSPSceneManager
Plugin=Plugin_OctreeSceneManager
#Plugin=Plugin_GuiElements
#Plugin=Plugin_NatureSceneManager
Plugin=Plugin_CgProgramManager 
Is it right?
gattu_marrudu
Gnoblar
Posts: 16
Joined: Tue Jul 19, 2005 7:27 am
Location: Sardinia, Italy

Post by gattu_marrudu »

Ok, I have solved it, though dunno precisely how... my programming skills are so poor, and I think the file resource.cfg was the point. I just replaced it with the one provided with the Samples, and it runs.
Post Reply