|
What's the blending mode settings for write alpha? |
roger levy
Member #2,513
July 2002
|
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. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
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. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
roger levy
Member #2,513
July 2002
|
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. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
See al_set_blender for references to the different (usual) drawing modes. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|