bitmap transparency
Antone333

I know its possible to make a color completely invisible. I use this already in my game. But I was wondering is there a way to draw a bitmap that is still visible but see through?

Edgar Reynaldo

Yes. Use 32 bit color and alpha channels on your images.

#00JMP00

If you want to draw translucent bitmaps onto others, you can use draw_trans. This will exactly do what you want. Other ways may fail :-))

Dizzy Egg

Yeah, what Edgar said. You can create an image in your 'graphics software' with an alpha channel; then, if you save it as something like .png you can load it in A5 and it will use the alpha channel, 32 bits (24 for the colours RGB and 8 bits for the alpha transparency....probably).

Antone333

could you point me to draw trans in the manual? i can't find it.

Chris Katko

Allegro 4 or 5?

Antone333

Allegro 5

Aikei_c

If you want to draw a bitmap half-transparent only sometimes, instead of editing it to include alpha channel, you could draw it tinted like that:

al_draw_tinted_bitmap(yourBitmap,al_map_rgba_f(0.5,0.5,0.5,0.5),x,y,0);

Thread #614797. Printed from Allegro.cc