Re: [AD] Changes to aWiki

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


Now I'm confused. Does it return AL_DISPLAY or AL_BITMAP? If the
former, why is it called al_create_display_bitmap?

My own view is that the destination for all drawing should be implicit
(so, for example, putpixel would be al_putpixel(x, y, colour) ) with a
function to select a particular bitmap as the destination. This is
because most drawing is done to the same bitmap (especially now that
the details of double buffering etc are handled by Allegro) and it
would also get rid of the strange parameter ordering between blit and
draw_sprite.

Pete

On 14/02/06, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> On Sunday 12 February 2006 15:36, Karthik Kumar wrote:
> > http://awiki.tomasu.org/bin/view/Main/Al_create_display_bitmap
>
> Hos is this function different from 4.3's al_create_display (or in other
> words, why does it have an extra _bitmap attached to it)?
> The current 4.3 display API (which already works, by the way) looks like
> this:
>
> AL_DISPLAY *al_create_display(int driver, int flags, int depth, int w, int
> h);
> int al_set_update_method(AL_DISPLAY *display, int method);
> void al_destroy_display(AL_DISPLAY *display);
>
> void al_flip_display(AL_DISPLAY *display);
> BITMAP *al_get_buffer(const AL_DISPLAY *display);
> int al_get_update_method(const AL_DISPLAY *display);
>
> al_create_display() creates a display (ie, window, or fullscreen blitting
> surface) that gets updated according to some update method (passed in the
> flags field). al_set_update_method() allows one to change the update
> method later on the fly and al_destroy_display() closes the window (or
> shuts down the full-screen mode).
>
> al_flip_display() flips the front and back buffers (or flips to the next
> page in a flipping chain), or does nothing when using a mode where one
> directly blits to the display surface. al_get_buffer() returns a BITMAP
> pointer to the back buffer or current drawing area in the flipping chain,
> and al_get_update_method() returns the update method used for the DISPLAY.
>
> A typical use looks like this:
>
> AL_DISPLAY *dpy = al_create_display(GFX_AUTODETECT,
> AL_UPDATE_TRIPLE_BUFFER, ...);
>
> ...
> BITMAP *screen = al_get_buffer(dpy);
> draw_everything(screen);
> al_flip_display(dpy);
> ...
> al_destroy_display(dpy);
>
> Evert
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




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