It is a pain in the ass to check which format can be used in order to create an image from a DDSImage object. It would be really nice to have a several methods, which provide the user with all the information he needs, without a lot of value checking.
DDSImage image = .... ;
gl.glTexImage3D(image.getTarget(), mipMapLevel, image.getInternalFormat,
image.getWidth(), image.getHeight(), image.getDepth(), border, image.getPixelFormat(), image.getPixelType(), image.getRawData());
image.getCompressionFormat(), image.getWidth(), image.getHeight(),
image.getDepth(), border, image.getSize(), image.getRawData());
There is also a problem for users with out knowledge out size calculation of compressed images.
The size is calculated by
int size = Math.max(PBS, width) / PBS * Math.max(PBS, height) / PBS
* bytes * depth;
where PBS is the pixel block size (uncompressed). So PBS contains the number of pixels, when they are uncompressed and bytes is the size of these pixel in the raw data buffer.
For "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT" PBS is 4 and bytes 16. The real problem occurs in small mipmap levels. where the width and / or height are below minimum block size;
It would be nice, if all DDS specific data would be stored in a data object and all actual important data, like OpenGL would be stored at the DDSImage object. (vice versa is also fine)
since you have obviously done some work on this feature,
it might be a good idea if you would try to solve this problem.
Have a look at the JOGL FAQ, source code, how to build etc..
*** Bug 422 has been marked as a duplicate of this bug. ***