Re: [AD] al_convert_bitmap

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


On Wed, Jun 8, 2011 at 9:11 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> I think the documentation is lacking justification for why you might
> want to create pseudo-video bitmaps before creating a display.
>
I think it has more to do with loading things in separate threads.

> Here's an idea: what if we introduce bitmap 'tags', where every bitmap
> is tagged with the current tag when it is created.
>
That might make the transition (forward compatibility) go more
smoothly if only tagged bitmaps were ever converted.

For 5.2, I think I would prefer if there were three flags:

ALLEGRO_ANY_BITMAP = 0
ALLEGRO_VIDEO_BITMAP
ALLEGRO_MEMORY_BITMAP

The default behavior (ANY) would create a video bitmap if possible,
otherwise it would fall back to a memory bitmap. The VIDEO flag would
fail if a video bitmap couldn't be created. (To maximize compatibility
that flag could be called REQUIRE_VIDEO with the old one being
deprecated, although personally I don't think it would be important
to.)

The tagged concept would make converting less ambiguous. Allegro
wouldn't have to keep track of which memory bitmaps were supposed to
be video bitmaps. Basically, Allegro would never auto upload any
memory bitmaps at any point.

--
Matthew Leverton




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