problems when loading relative files referenced by an IRR

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
mvalle
Posts: 18
Joined: Tue Oct 02, 2007 4:58 am
Location: Brazil

problems when loading relative files referenced by an IRR

Post by mvalle »

I have been trying to load irr files from my code, just like the tutorials do. Simple example load with no problems, but if I create an irr file and reference textures from it, irr licht just can't find the textures when I load the irr file from my program.
The solution for me was to edit the irr files manually and put the absolute texture path when needed, like follwing:
<texture name="Texture1" value="C:\VivaRock\media\default_skybox1.jpg" />
Am I doing something wrong? Has someone already had this king of problem?
Thanks in advance.
wildrj
Posts: 301
Joined: Thu Mar 23, 2006 12:49 am
Location: Texas/ Cyberspace
Contact:

Post by wildrj »

change from "\" to "/" irrlicht only handles "/" :/
http://wild.deathtouchstudios.com << My gamedev blog
<Programming is a way of life>
If at first you don't succeed press the delete key till you do :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, Irrlicht perfectly handles \ on platforms that support this separation character. However, most filenames will replace the \ by / before working with it. The problem here is probably a wrongly set working directory, such that relative paths dont work.
Post Reply