Re: [AD] al_convert_bitmap

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


On Tue, Jun 14, 2011 at 3:29 PM, Elias Pschernig
<elias.pschernig@xxxxxxxxxx> wrote:
> Makes sense. So al_destroy_display simply would go through the display
> bitmaps and remove the VIDEO flag from any bitmaps without the ANY flag
> - meaning the only operation allowed on them from now on is calling
> al_destroy_bitmap.
>
I took it to mean it would destroy the video bitmap and replace it
with something like a 1x1 memory bitmap. Thus the bitmap and all
operations on it would be valid, but there would be little memory
associated with it. To the programmer it would look like the bitmap
was simply "erased".

It's really kind of a no-good-solution situation. I was trying to
avoid this altogether with the ANY_BITMAP approach.

It was much simpler ... with it there's no difference between a video
bitmap and a memory bitmap that has been converted to a video bitmap.
Allegro wouldn't be able to tell them apart... they would always be
downgraded to memory and added back to the convert-list vector.

> We could provide bitflags instead of numbers:
>
> NO_AUTO_MEM_VID = 1
> NO_AUTO_VID_MEM = 2
> NO_TRANSFER = 4
>
Mine were based on a bitfield, but I didn't have the transfer flag.
Given that the person could use al_convert_bitmaps() to transfer those
bitmaps, I don't think it's necessary.

I wouldn't ever expect Allegro to transfer video bitmaps to another
dislpay... if it is doing it now, I wouldn't have thought it would.

--
Matthew Leverton




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