Re: [AD] Component ordering and mixing color depths

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


> If you're not using the overlay as the screen bitmap, then what for?

Ahemm... I really messed up this thread... yes, of course, Allegro's screen is 
32 bpp. The gfx card framebuffer is 15 bpp.

> In the end, I realized that users may have set a 32-bpp mode, loaded
> some bitmaps, then switched to a 16-bpp mode which may have a different
> component ordering from the 32-bpp mode.

I'm very skeptical: isn't the component ordering consistent in all color 
depths on a given gfx card ?

> If set_gfx_mode would reset the 32-bpp component shift values, then both
> color conversion and blending would come out wrong.

set_gfx_mode() doesn't reset the 32-bpp shift values anymore with the patch 
Grzegorz was talking about in his message.

> So I coded up two functions, one for blending RGB over RGB (or BGR over
> BGR - it's the same code), and one for RGB over BGR (or BGR over RGB).

Nice!

-- 
Eric Botcazou




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