Re: [AD] al_clear

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


On 12 Mar 2009, at 10:00 , Elias Pschernig wrote:
Yes, once you know what a "target bitmap" is. But a typical Allegro user
will never have heard of such a concept.

Right now, if you want to open a window, load an image then draw the
image and also draw a line, the functions are:

al_create_display
al_load_bitmap
al_draw_bitmap
al_draw_line

Except that a window is called "display" and a picture is called
"bitmap", it's very logical naming.

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.

But weird if I ever want to use it to clear anything other than the display. So, how about we have al_clear_target_bitmap(), which clears the current target bitmap, and al_clear_display()/screen(), which clears the backbuffer for the current display (ie, it's the same as al_clear_target_bitmap() in the common case where the target bitmap represents the screen)?

Evert




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