Wait... Why isn't my mesh loading?!

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
GlitchGuy2
Posts: 10
Joined: Mon May 04, 2009 12:45 am
Location: Yeah, right

Wait... Why isn't my mesh loading?!

Post by GlitchGuy2 »

Okay, I've attempted many times over on both my desktop AND laptop computer, and even though the files are in the same directory as my .EXE and Irrlicht.DLL is in the directory too, I can't load it, I'm loading the model with device->getMesh() but it won't load.

The only hint I have in compiler error is:
Could not load mesh, because file could not be opened.: raccoon.3ds
And it DOES work, the .EXE runs, but the model doesn't appear.

I am using Windows XP.
That guy who likes games featuring animals
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

The "because the file cannot be opened" message means it's probably looking in the wrong location for the file. Check your working directory.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Post by Seven »

are you running from within the IDE or from the directory (i.e. windows explorer) ?

uh-oh, me and Bitplane thinking alike....
GlitchGuy2
Posts: 10
Joined: Mon May 04, 2009 12:45 am
Location: Yeah, right

Post by GlitchGuy2 »

Uh, you're gonna kill me when I say this, but uh... How do I do that? Is it supposed to be set in code? Or do I have to configure something in the Control Panel?

Edit
@ Seven, I don't understand what you mean...

Edit 2

Never mind, I see what you meant now. But is there a way to check the .EXE directory to debug the program WITHIN the IDE or no?
That guy who likes games featuring animals
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Post by Seven »

which IDE are you using?

in Visual Studio

right click project name
select 'properties'
in "configuration properties" set the "working directory"


edit :

you need to set the output directory to the same thing. for example, most of the tuts use ..\bin
Last edited by Seven on Sat Sep 19, 2009 10:00 pm, edited 1 time in total.
Lil Margin
Posts: 212
Joined: Sun Jul 19, 2009 4:24 am
Location: Netherlands Antilles, Curacao

Post by Lil Margin »

try putting the models,etc where the irrlicht.dll is...
located in irrlicht BIN folder + the compiler your using...
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Lil Margin wrote:try putting the models,etc where the irrlicht.dll is...
located in irrlicht BIN folder + the compiler your using...
You don't want the models to be where the dll is. You usually want the models to be in a directory relative to the directory that the executable is in. Sometimes you want them in the same directory.

Travis
Post Reply