Is there a way to add opacity to a shape?
AleX-G Squadron

Hi guys!
I am searching for a way to create a square at the right of the screen in order to add points in there. Is there a way i can do this?
Also, the square must have an opacity(transparency).

Matthew Leverton

Yes, it can be done. Use primitives with the proper colors and blender.

Dizzy Egg

If your using Allegro 4.x you can use draw_trans_sprite after setting the blender; if your using Allegro 5 I'm stuck.

Thomas Fjellstrom
Dizzy Egg said:

If your using Allegro 4.x you can use draw_trans_sprite after setting the blender; if your using Allegro 5 I'm stuck.

Actually, in allegro 4, if you're using the primitives, you want to call drawing_mode to setup translucent drawing.

Desmond Taylor

and in Allegro 5 it's al_set_blender() and then al_draw_*()

Dizzy Egg

Thomas, I thought it was set_trans_blender() ?? I smoke a lot :(

EDIT:

Ahh using primitives, sorry :-[

Thread #608578. Printed from Allegro.cc