hi,all
i try to example 08.SpecialFX but visual studio message error in screen dos:
could not load mesh,beause file couldn't be opened ::.../.../media/room.3ds
how to fix error???
help me
thanks
could not load mesh,beause file couldn't be opened room.3ds
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: could not load mesh,beause file couldn't be opened room.
Well, ... looks strange, and in general this is just due to a wrong working directory.
Re: could not load mesh,beause file couldn't be opened room.
i from vietnamese . my english is bad.
I download irrlicht -1.7.3 from http://irrlicht.sourceforge.net/downloads/
in directory's irrlicht-1.7.3 have directory media.i don't repair or remove anything
I download irrlicht -1.7.3 from http://irrlicht.sourceforge.net/downloads/
in directory's irrlicht-1.7.3 have directory media.i don't repair or remove anything
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: could not load mesh,beause file couldn't be opened room.
Yes, all the files are there. But when starting the example from somewhere, you have to make sure that the relative(!) path you give the application is correct from where you are. So to be sure move to the bin/win32-visualstudio directory and start the app by clicking, or change to that directory on command line and run the example. Then it should work.
-
- Posts: 1010
- Joined: Mon Oct 24, 2011 10:03 pm
- Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d
Re: could not load mesh,beause file couldn't be opened room.
I assume youa re using Code::Blocks and MinGW, either way the working directory is often set as the dir where either your source files or binary files are, thus try this file path "media/room.3ds"
also, make sure your media directory is in the folder where you have your source files. if that won't work try where the binary files are, or manually set the working dir to where you want it.
also, make sure your media directory is in the folder where you have your source files. if that won't work try where the binary files are, or manually set the working dir to where you want it.
"this is not the bottleneck you are looking for"
Re: could not load mesh,beause file couldn't be opened room.
Hmm, I assume he just copied that example to another place like I did for the first time, in which case the media folder could not be found.
Because the paths are all hard coded in cpp files, you can simply edit them before compiling. They are usually in a pattern like "../../media/dwarf.x", just change that if you want your media folder to be in another place.
Because the paths are all hard coded in cpp files, you can simply edit them before compiling. They are usually in a pattern like "../../media/dwarf.x", just change that if you want your media folder to be in another place.
Re: could not load mesh,beause file couldn't be opened room.
i copy file main.cpp from example 8.specialFX.hybrid wrote:Yes, all the files are there. But when starting the example from somewhere, you have to make sure that the relative(!) path you give the application is correct from where you are. So to be sure move to the bin/win32-visualstudio directory and start the app by clicking, or change to that directory on command line and run the example. Then it should work.
i had run example 01 hello_world success.
When i research function getMesh(),i don't understand it.
in library IAnimatedMesh.h ,i look getMesh()
Code: Select all
virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) = 0;
i had read tutorial in place :http://irrlicht.sourceforge.net/docu/example008.html
Re: could not load mesh,beause file couldn't be opened room.
I can't spot any getMesh function being used with no arguments in that sample. It's just that instead passing all of the values, default ones are used.
Working on game: Marrbles (Currently stopped).
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: could not load mesh,beause file couldn't be opened room.
You are mixing methods from different classes. You want to find the one from ISceneManager, which loads meshes. But the one you show is from IAnimatedMesh, returning a mesh pose at a certain animation.