RE: [AD] No more video/system bitmaps

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


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.

This is an initial usage hint, as to avoid redundant copies of the data
if the bitmap was initially allocated in the wrong place w.r.t its
usage.

Of course, this doesn't avoid the extra work if the user defines the
usage of the bitmap "incorrectly".

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.

If you start changing it every frame, AL should demote it to whatever
works best for the current driver, which may include demotion to a
memory bitmap.

However, this is completely transparent to users. Users don't know where
the bitmaps live currently, nor should they really need to.

Hope this clears things up.


> -----Original Message-----
> From: alleg-developers-admin@xxxxxxxxxx [mailto:alleg-
> developers-admin@xxxxxxxxxx] On Behalf Of Peter Wang
> Sent: Tuesday, May 31, 2005 4:48 PM
> To: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] No more video/system bitmaps
> 
> On 2005-05-31, Robert Ohannessian <ROhannessian@xxxxxxxxxx> wrote:
> > A bitmap is defined when it is either:
> >
> > - Allocated and then Copied from an existing bitmap.
> > - Allocated and then cleared.
> > - Allocated and then defined via a al_acquire_bitmap() /
> > al_release_bitmap() pair.
> > - Loaded via load_*() (which indirectly uses one of the methods
above).
> 
> I don't understand.  If I do this:
> 
> 	bmp = al_create_bitmap(AL_STATIC_DRAW, ...);
> 	al_clear_bitmap(bmp);
> 
> That makes it defined?  Does that mean I can't draw to it any more?
> 
> Like Elias, I think I need to see some examples.
> 
> Peter
> 
> 
> 
> -------------------------------------------------------
> 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/