Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » al_set_blender() behaves differently on different drivers (4.9.3)

This thread is locked; no one can reply to it. rss feed Print
al_set_blender() behaves differently on different drivers (4.9.3)
Todd Cope
Member #998
November 2000
avatar

Here's an image of the problem:

http://www.allegro.cc/files/attachment/596192

Here's the code:

void render(void)
{
    char buf[16];
  
    al_clear(al_map_rgb(0, 0, 0));
    al_set_blender(ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA, al_map_rgba(255, 255, 255, 255));
    al_draw_bitmap(test_image, 0, 0, 0);
    al_set_blender(ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA, al_map_rgba(255, 255, 255, 127));
    al_draw_bitmap(test_image, 0, 64, 0);
    al_flip_display();
}

When I use the D3D driver (left image), the alpha value doesn't affect the overall opacity of the output of al_draw_bitmap(). I switched to the OpenGL driver (right image) and the alpha value does have an affect there.

Trent Gamblin
Member #261
April 2000
avatar

I've matched the OpenGL driver's behaviour in D3D in subversion. Thanks for bringing this to our attention!

Go to: