Where to save images?

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
Lupinius
Posts: 11
Joined: Thu Apr 30, 2009 8:50 pm
Location: Emden, Germany

Where to save images?

Post by Lupinius »

I'm using the netbeans IDE, and have the problem that I don't know where I have to save images if I want to load them as textures.
Saving with the source files won't work, saving to the executable isn't working, neither just adding to the project.
Where do I have to save it?
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Do you launch the "game" from IDE or from executable?
If you launch it from executable than textures should be placed in the same folder as the executable like:

Code: Select all

bill->setMaterialTexture(0, driver->getTexture("media/particle.bmp"));
The texture should be placed in media folder which should be in executable folder unless you changed the working directory in your code.
If you launch from IDE you should check project properties or IDE options to see if it has its specific working dir.
Working on game: Marrbles (Currently stopped).
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

in general you can save your images anywhere you want, as long as you use the correct path with getTexture("path/to/the/images.bmp") !!! :lol:
but like srengeor said, it should be a usable path (e.g. "./media/image.bmp")... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
CuteAlien
Admin
Posts: 9935
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I have no experience with Netbeans, but in most IDEs you can set a working directory. If you set that to the path where the executable is located you then can always have the media relative to that.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply