How do I draw a translucent triangle?
I read the manual but I still don't get it... (This is so embarrassing...)
Can anyone give me some example code?
Why don't you check allegro examples? I'm sure http://www.allegro.cc/manual/miscellaneous/available-allegro-examples/exblend should help you with what you need and maybe others as well.
I checked out that webpage but none of the examples show up...
Anyway, according to the description, the example shows how to display translucent sprites.
I already know how to do that because there's that draw_trans_sprite function.
But how do I draw translucent primitives, like triangles?
drawing_mode(DRAW_MODE_TRANS, 0, 0, 0);
Thanks!
But how do I make the color of the triangle translucent?
Should I use makeacol32?
I think you have to use set_trans_blender for that.
The website only contains references to the demos. You need to download the actual stuff to see them
If you've downloaded the binary from this site then that doesn't include the manuals, samples, demos, etc. just the library.
But how do I make the color of the triangle translucent?
That depends.
In any case, you need to set a trans blender (or a similar blending mode).
If you use the primitive triangle or polygon functions, then indeed it's set_drawing_mode() you're looking for. If you use the polygon rendering functions, then you need to pass a translucient polygon type (POLYTYPE_XXXX_TRANS).
set_trans_blender for translucent primitives, and set_alpha_blender for using alpha masks.