PDA

View Full Version : SOIL - "Unable to open file"



Fezziwig
07-09-2012, 01:41 PM
I'm having a problem with loading textures in soil at the moment. It only seems to work when I give to whole directory of the file as opposed to the directory relative to the executable file.

tex = SOIL_load_OGL_texture(afilename,SOIL_LOAD_AUTO,SOI L_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);

It works fine if I type in the directory like this:

tex = SOIL_load_OGL_texture("Data/Image.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);

but I've checked
afilename and it's identical to "Data/Image.png".

I can't understand what could be causing this error.

Thanks,
Rowan.