LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: amannis on January 06, 2005, 17:14:04

Title: DevIL alpha channel
Post by: amannis on January 06, 2005, 17:14:04
How can I check if an image has an alpha channel or not? I checked the DevIL docs but couldn't find anything.
I need to know if I have to pass RGB or RGBA for glTexImage2D().

I've been using ImageIO before and then I just always created an image of type BufferedImage.TYPE_4BYTE_ABGR and it worked fine with just passing RGBA to glTexImage2D().

I guess ILUT had somekind of texture loading method which did this automatically?
Title: DevIL alpha channel
Post by: WiESi on January 06, 2005, 18:15:57
I'm not sure, but look here:
http://openil.sourceforge.net/docs/il/f00027.htm
Try ilGet either with IL_IMAGE_FORMAT or IL_IMAGE_TYPE. I don't know exactly.

WiESi
Title: DevIL alpha channel
Post by: amannis on January 06, 2005, 18:26:52
Ah i should've looked more carefully, ilGetInteger(IL_IMAGE_FORMAT) did the trick.

Thanks!