Re: [AD] Documentation update

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


> Well, you have just pointed out how broken Allegro's API is because
> it has always preserved backwards compatibility. Whenever Allegro's
> old API is gone for good you will enjoy a single call with an
> included color depth.
> 
> In the meantime we have to flag your example as something users
> should never do, and improve the documentation of set_color_depth()
> to tell the user their next call should always be set_gfx_mode().

set/get_color_depth is only used (as documentation says) to select
color depth that will be used by next call to set_gfx_mode and
create_bitmap. If you don't call set_color_depth allegro will choose
default (8 bpp).

> Or just say that between set_color_depth() and the next successful
> call to set_gfx_mode() graphic operations are undefined/invalid.

No, all graphic operations (blit, draw_sprite, line, ...) use
bitmap_color_depth to find out which color depth are bitmaps they are
using, so they are unaffected by set_color_depth.




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