[Plib-devel] Texture loading problems (bmp/rgb)
Brought to you by:
sjbaker
From: Jan R. <slo...@gm...> - 2006-11-18 08:18:01
|
Hello, I'm currently having two problems with texture loading, and I want your opinion if these are real bugs, missing features or whatever. First: bmp loading As already stated in bug tracker item 1275291, bmp textures are displayed flipped (upside down). Is this a generall problem? Or does bmp support different modes (like "first pixel bottom left" / "first pixel top left") which aren't properly evaluated? The loader seems to always flip the loaded data. If someone can give me a heads-up on the bmp format details I'd like to prepare a bugfix. Second: rgb loading When loading an rgb texture, there's a check if the number of bit planes is two or four. If this is the case, the texture is deemed to be translucent (translucent greyscale or RGBA). But this makes a textured object translucent no matter if the texture really uses the alpha channel or not. Wouldn't it make more sense to check if any pixels in the alpha channel are really set to values less than 1.0? None of the tools I'm currently working with (mainly the GIMP) seems to be capable of producing a pure RGB .rgb image, only RGBA, so the textured objects will randomly be hidden behind other translucent objects. My only choice right now is to fall back to .bmp textures which I don't like for several reasons, one being the bug mentioned above. Would it hurt to extend the rgb loader like this? Kind regards, Jan R. -- Jan Reucker email: jan dot reucker at web dot de web: http://www.reucker-online.de |