hi
when you want to use the icon to start a compiled irrlicht example your have to change your working directory so that the bin can find the meshes and textures to include. Or in another way, you can define your meshes with an absolute not an relative path.
greets
lethe
Stupid Linux Question...
Last edited by disanti on Tue Feb 22, 2011 8:07 am, edited 1 time in total.
>Shouldn't Niko make the engine able to load meshes if run from the X-Server instead of the Konsole?
hmmm, it also seems textures are not loaded when the engine is started from konqueror. Does anyone know why this is?
hmmm, it also seems textures are not loaded when the engine is started from konqueror. Does anyone know why this is?
Core2Duo E8400 3.0ghz - 2048mb DDR2 800 - geForce 9600 - Slackware12.1
Word-image-symbol programming limits, controls, and imprisons the individual.
Smash the control images, smash the control machine.
Word-image-symbol programming limits, controls, and imprisons the individual.
Smash the control images, smash the control machine.
Another one of my old and embarrissing posts brought up! Lol, anyway, I found a solution to this:
Put this function somewhere in your code:
Put this where you want to load a file:
I just wrote this code yesterday and havn't actually tested it so if someone could test it for me it would be WONDERFUL! Thanks~ John DiSanti
________
SUZUKI LJ
Put this function somewhere in your code:
Code: Select all
/*getLastSpecifiedCharFromString*/
int getLastSpecifiedCharFromString(char* string, int character)
{
int last = 0, num = 0;
while(*string != 0x00)
{
if(*string == (char)character)
{
last = num;
}
num++;
string++;
}
return last;
}
Code: Select all
//linux is tricky, we have to make sure Irrlicht knows the path to the file
char path[MAX_PATH];
memset(path, 0x00, sizeof(path));
path = argv[0];
int placeoffilename = getLastSpecifiedCharFromString(path, 0x2F);
memmove(path+placeoffilename,"thefile.zip",8);
window->device->getFileSystem()->addZipFileArchive(path, true, true);
________
SUZUKI LJ