The allecro manual for 5.0 RC4 says that using the following code will draw a bitmap that has 50% opacity:
al_draw_tinted_bitmap(bitmap, al_map_rgba_f(1, 1, 1, 0.5), x, y, 0);
I went ahead and tried the same thing in my project:
al_draw_tinted_bitmap(panelBG,al_map_rgba_f(1,1,1,alpha),x,y,0);
However, it does not draw the bitmap at 50% opacity when alpha=0.5. I also tried alpha = 0, but the bitmap is still drawing with distorted colors.
Here is what it renders when I draw when alpha = 0:
This is what it looks like with no tinting (eg, all multipliers are 1)
http://imgur.com/26Hd0.png
Hopefully you can help me out or point me in the right direction
I think this is related to the new default of using pre-multiplied alpha, you can either change the default blender back to how it was (I can't remember what that was atm), or do: al_draw_tinted_bitmap(panelBG,al_map_rgba_f(1*alpha,1*alpha,1*alpha,alpha),x,y,0);
Thanks! Worked perfectly.
Someone should probably update the manual with that information too