Well, I understand (kinda) why TextureLoader does not detect format. To
summarize, it's a pain. I posted a message to the Java2D group and
figured it out though.
Actually, I think TextureLoader should use the ImageConsumer interface.
Here is what I got out of it:
TextureImageConsumer alphachecker = new TextureImageConsumer();
image.getSource().startProduction(alphachecker);
if(alphachecker.hasAlpha) format = "RGBA";
else format = "RGB";
class TextureImageConsumer implements java.awt.image.ImageConsumer
{
public boolean hasAlpha;
public void setColorModel(ColorModel model)
{
hasAlpha = model.hasAlpha();
}
... all the other overridden functions also...
}
Now, at least I can use the format string to tell TextureLoader which
one I want and can turn on transparency blending as necessary based on
Texture.getFormat().
A better texture loader would do more that just RGB and RGBA...
-Lee
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".