I’ve added support for DXT1, DXT3 and DXT5 compressed texture support based on Xith3D_2005-02-08_cvs. Currently only for the JOGL renderer (LWJGL still works but doesn’t support these formats).
For this I’ve made some changes in ImageComponent (new FORMAT_xxx flags) and many changes in TextureShaderPeer for JOGL (changed half of defineTexture() to make it easier to maintain).
I also think that TextureLoader needs a major overhaul. Java doesn’t like custom BufferedImage formats. I get “Unable to transform image” on some file formats. The best way would be to move from BufferedImage to byte[]. This will need a bit of code to handle the common formats (R8G8B8, R8G8B8A8, R5G6B5, …) and a generic code path that handles the other formats.
We still need entrypoints for BufferedImage but we should not base our internal processing (atleast for static textures) on it. With this I mean MipMap generation. My idea: Convert the BufferedImage to a BufferedImage with a 2^x size and a processable internal format (only when needed), then do simple box scaling for mip maps.
Also ImageComponentXX should only hold references to the passed byte[] or BufferedImage for dynamic textures.
TextureLoader should be changed so that one can add his own image loaders (e.g. DDS importer) or file sources (e.g. URL handling or custom archive files). It also should not quit the application when a texture could not be found (may be replace it with a hardcoded “404” image ?)
How is currently maintaining the texture handling stuff ?
Ciao Matthias Mann
