RE: [AD] No more video/system bitmaps

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


Static/Dynamic/Stream can be pretty much ignored for the existing
drivers. It does affect AGL though.

For example, "static" bitmaps blitted to the screen would make AGL just
use glDrawPixels() if the bitmap is in memory. However, "static" bitmaps
would default to uploading a texture, then drawing that. So if the
texture is drawn multiple times, the texture upload is a win. Otherwise,
glDrawPixels() is a win (no pollution of texture cache, etc).

"Dynamic", in the context of AGL, pretty much means memory bitmaps.


Of course, bitmaps can migrate from one usage to another. The initial
usage just defines where the bitmap should live initially.


> -----Original Message-----
> From: alleg-developers-admin@xxxxxxxxxx [mailto:alleg-
> developers-admin@xxxxxxxxxx] On Behalf Of Elias Pschernig
> Sent: Tuesday, May 31, 2005 8:52 AM
> To: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] No more video/system bitmaps
> 
> 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
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit
http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers




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