One-line fix to BSP texture finding

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

One-line fix to BSP texture finding

Post by hendu »

http://sourceforge.net/tracker/?func=de ... tid=540678

This would typically be needed when using other filesystem abstraction than Irrlicht's.

If not using irr's is a supported scenario, please apply to both 1.7 and 1.8.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: One-line fix to BSP texture finding

Post by hybrid »

I don't understand the patch so far, looks like you do the same thing that would be done in the next two lines. But I need to have a look at the whole code first.
Ok, I see the problem. However, the fault is that existFile does not recognize memory files and other special things. This will be fixed in one of the next releases of Irrlicht. We cannot remove the existFile, though, because it would create lots of false warnings.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: One-line fix to BSP texture finding

Post by hendu »

I don't think changing existfile would be good, wouldn't that require one to subclass the irr filesystem classes etc?

Having a check for when the texture is already loaded, with that relative name, seemed like the best solution to me.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: One-line fix to BSP texture finding

Post by hybrid »

The problem is that the loader generates a number of file name guesses. Each getTexture() raises a warning if the named file does not exist. Hence, all loaders do an existFile now, and only load the file if it exists. The warning is only generated once per texture name (at most).
The thing with existFile is that it already searches the archives, just not certain other special files. So it would be good to have it working always correctly.
Post Reply