I have abstracted the abstractable parts of the TextureLoader and ported it to JAGaToo. Fortunately there are only a few changes, that affect the Xith3D API. Please refer to
this posting to read about them.
The new TextureLoader uses implementations of TextureFormatLoader and TextureImageFormatLoader to directly load from image files into Texture instances. Only if there is no implementation for the requested format, the fallback-loader is used, which uses ImageIO.
The currently implemented TextureImageformatLoaders and TextureFormatLoaders are added to the TextureLoader by default, so that faster texture loading can be done, if there's a compatible loader.
The fallback-loader now uses ImageInputStreams to load the texture-data directly without the use of (standard) BufferedImages. This is about 25% faster. Unfortunately it is still much slower than the other TextureImageFormatLoaders. As an example I loaded a 512x512 JPEG 50 times. It took about 11 seconds. Loading it 50 times from a TGA for example takes 2.2 seconds. Unfortunately the JPEG format seems to be quite complicated, so implementing a direct loader will not be too simple.
Mipmaps are now also generated without using temporary memory or BufferedImages, but are directly generated into the TextureImages' ByteBuffers. This should be slightly faster and in any case less (temporary) memory intensive.
The new TextureLoader now supports loading of Texture3Ds.
I have added valid implementation of duplicateNodeComponent() for Texture2D and Texture3D. This way you can load a Texture, apply some filters, etc. to it, then use cloneNodeComponent( false ) to get a shared copy of the texture and apply different filters to it.
Marvin