Re: [AD] No more video/system bitmaps

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


On Tue, 2005-05-31 at 08:20 -0700, Robert Ohannessian wrote:

> I propose this modification to al_create_bitmap(): Remove the "type"
> parameter, and add a "usage" parameter. The usage parameter is
> logically an enum from the list {AL_STATIC_DRAW, AL_STATIC_READ,
> AL_DYNAMIC_DRAW, AL_DYNAMIC_READ, AL_STREAM_DRAW, AL_STREAM_READ}.
> 
> "Static" means the image does not change after being defined.
> 
> "Dynamic" means the image does change often.
> 
> "Stream" means the image will not be used often after it was defined
> (for example, for temporary bitmaps).
> 
> "Read" means the application will perform reads on the bitmap via
> al_acquire_region().
> 
> "Draw" means the application will not perform reads on the bitmap via
> al_acquire_region() (other reads are OK).

I'd like some more examples when you would typically use each of them,
and what implications each one would have for implementations.

I agree completely with the idea though, the use of system bitmaps isn't
clear at all, and even video bitmaps are something users shouldn't have
to worry about. I somehow wonder if there shouldn't be something like an
"offscreen" usage though, a bitmap that may fall under "dynamic", but
never is actually drawn. E.g. when you use bitmaps for map creation. Or
would that be "stream"?

-- 
Elias Pschernig





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