Re: [AD] Documentation update |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] Documentation update
- From: <spoofer255@xxxxxxxxxx>
- Date: Wed, 27 Apr 2005 08:21:47 +0200
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tdSORmoaT00KyJ2P2wMA4eVyS5I60AX50IDEJbZ1uxCKYx16hgU0h5Q882hSZOKBi+8g8WmMuphiZEgSko8ADIrczJEohKzzBtWb54J57wUqBcsZK2s2KgZaNmddHNFiQgcUc6lj3tCi4Ei9JK/sLWB/lXTx65TXFprNLNSfASQ=
> 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.