Re: [AD] al_clear

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


Peter Wang wrote:

Let's have a function:
void al_clear_screen() { // or rather al_clear_bakbuffer()
   old = al_get_target_bitmap();
   al_set_target_bitmap(al_get_backbuffer());
   al_clear_target_bitmap();
   if (old != al_get_backbuffer())
     al_set_target_bitmap(old);
}

and make a promise we won't do this with every drawing function.

I don't think it's very useful to clear the backbuffer while keeping
the target bitmap as something else.  Usually you'd clear the backbuffer
as a precursor to drawing onto it.

But you sure wouldn't like al_clear_screen() to change the target bitmap. What you see here are implementation details. The point is, we can have both al_clear_screen() and al_clear_target_bitmap().


--
Milan Mimica
http://sparklet.sf.net




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