Re: [AD] No more video/system bitmaps

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


On 2005-05-31, Robert Ohannessian <ROhannessian@xxxxxxxxxx> wrote:
> That's not it; You *never* restrict usage. You don't (normally) restrict
> where the bitmap lives during its lifetime. You only restrict / define
> where the bitmap is initially allocated.

Thanks.

In what situation AL_STATIC_DRAW would initially allocate the bitmap in
the "right" place?

> In your example, the bitmap will be allocated in video memory (Texture,
> DX Surface, etc), since you're telling AL that you're going to define
> the bitmap just once, and then repeatedly use it as a source for other
> drawing operations.

The situation I was envisioning was this: say I want to allocate a
bitmap, clear it to some colour, do some drawing operations on it, and
thereafter the bitmap won't be changed.  I suppose the only use for it
would be as a source image.  What should the initial usage hint be?


I wonder if it would be simpler to have an explicit call like
al_define_bitmap().  Promotion/demotion would only happen at those
calls, and only to the bitmap for which it was called.  Otherwise I'm
afraid al_flip_display() may have too much work to do on some frames.
I also wonder what would happen if there were multiple threads, each
calling al_flip_display() on its own display.  Would each thread be
wanting to traverse a global list of bitmaps?

Peter

PS.  The word "static" is misleading if "you *never* restrict usage".
You wrote: 
	"Static" means the image does not change after being defined.





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