Re: [AD] al_clear

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


Elias Pschernig wrote:

Next, this Allegro user wants to clear the screen each frame to avoid
droppings when he moves the image (or line). "al_clear_target_bitmap"
will likely not sound like it's the right function. So that's what I
meant, it's technical naming. I'd be fine with that - but I'd prefer
al_clear_screen (or something like that), it's just a "nicer" name.

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.


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




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