Re: [AD] al_convert_bitmap

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


On Fri, Jun 17, 2011 at 6:33 AM, Elias Pschernig
<elias.pschernig@xxxxxxxxxx> wrote:
> I'd still make ALLEGRO_AUTO_CONVERT_BITMAPS a negative flag - if you
> understand what memory/video bitmaps do and maybe even know what
> "OpenGL" and "DirectX" and "texture" means there's less need for the
> auto-conversion. But anyone else trying Allegro for the first time will
> have a good chance of getting things wrong and see very poor performance
> results.
>
To me, this isn't really about making Allegro more newbie-friendly. A
warning in al_create_bitmap() and al_load_bitmap() that says you will
get a slow memory bitmap if you use the functions outside the context
of a display should suffice.

I would not be in favor of having to do this:

set_flags(ALLEGRO_MEMORY_BITMAP | ALLEGRO_NO_CONVERT_BITMAP);

And if

set_flags(0) == set_flags(ALLEGRO_CONVERT_BITMAP)

then there is no way to specify "Give me a video, then a memory, but
don't ever convert it." Although, admittedly, that's not a very useful
scenario.

But I really don't care if the display conversion option is enabled by
default. You'd still have to explicitly set bitmaps to conversion for
it to do anything.

This is kind of an aside, but does Allegro not support setting display
options to 1 by default? That is, if the behavior were automatic,
what's wrong with just using a default value of 1 if it's never
specified? Having to set a negative option to 1 to enable something is
confusing. (Obviously with bitflags, the negative wording is a
necessity.)

--
Matthew Leverton




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