Re: [AD] alpha blending in new GFX API

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


This was really not the intent. The intent here to have memory/video bitmaps inherit the necessary parameters from the parent bitmaps for being able to be blited properly. For example, we'd probably want the OpenGL context handle ((HGLRC, HDC) pair in Windows), or the proper component ordering.

al_create_bitmap_2() (which probably needs a better name) is there to actually explicitly allow differing formats.


Milan Mimica wrote:
The short question: Will alpha blending will available in color depth
lower then 32-bit?


How I see it in http://allegro.dotsrc.org/future/gfx-api.txt, the
programmer won't be able to create a RGBA bitmap in 16-bit color depth
(or any other lower then 32-bit mode). The only assumption I'm making is
that al_create_display_bitmap() will fail with other then desktop's color depths on platforms that not allow changing color depth on the fly, like X11.

Bitmaps created with al_create_bitmap() inherit color format from the
parent. Hence, you can only create video bitmaps with the same color
format as the display bitmap. You see the problem? No way to create a RGBA video bitmap. No way to do hardware accelerated blending in 16-bit mode. OpenGL does allow that.

Allegro 4.2.1 + AllegroGL suffers from the same design problem. I was
looking if I could implement alpha blending in AGL, but couldn't because I cannot run my X server in 32-bit color depth.







Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/