I want to write RGBA to the target bitmap with no blending. Specifically I want to erase part of my bitmap with al_draw_filled_rectangle.
You should be able to use this to overwrite only the alpha portion of the target bitmap :
al_set_separate_blender(ALLEGRO_ADD , ALLEGRO_ZERO , ALLEGRO_ONE , ALLEGRO_ADD , ALLEGRO_ONE , ALLEGRO_ZERO);
I missed that you want to write the RGB as well. Switch the 2nd and 3rd parameters to overwrite the RGB as well.
thanks, this works for erasing part of the bitmap, but, not sure if i'm doing something wrong, it doesn't seem to work when drawing bitmaps, i'd expect it to be the same as turning off alpha transparency, but nothing shows up, except for, strangely, al_draw_text commands.
EDIT: NEVERMIND! i forgot i'm blitting my bitmap over the entire screen. i need to restore normal blending before doing that to see anything, obviously.
See al_set_blender for references to the different (usual) drawing modes.