Page 1 of 1

Where to save images?

Posted: Thu Jun 11, 2009 5:47 pm
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?

Posted: Thu Jun 11, 2009 6:16 pm
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.

Posted: Thu Jun 11, 2009 6:32 pm
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")... ;)

Posted: Thu Jun 11, 2009 7:15 pm
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.