Re: [AD] 4.3.0 progress

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


On Sunday 23 July 2006 05:35, Peter Wang wrote:
> > 3. ex3buf wants to use triple buffering now but my video card cant
> > support this for whatever reason. ex3buf didnt need triple buffer
> > before, why does it now?
> 
> This is normal now.  I think the video memory "emulation" was removed
> from the X port.  Evert?

It's still somewhere inside the driver (which is the old one), but 
set_gfx_mode() ignores the virtual screen parameters:

int set_gfx_mode(int card, int w, int h, int v_w, int v_h)
{
   al_destroy_display(al_main_display);
   
   al_create_display(card, AL_UPDATE_NONE, get_color_depth(), w, h);
   if (!al_main_display) {
      return -1;
   }

   screen = al_main_display->screen;
   gfx_driver = al_main_display->gfx_driver;
   
   return 0;
}

The proper way to do triple buffering (or any other update method) is

AL_DISPLAY *dpy = al_create_display(GFX_AUTODETECT, 
AL_UPDATE_TRIPLE_BUFFER, colour_depth, width, height);
BITMAP *screen;

do {
   screen = al_get_buffer (dpy);
   draw_stuff(screen);
   al_flip_display(dpy);
} while (busy);

That said, I don't think the X11 driver implements request_video_bitmap(), 
in which case it cannot do real triple buffering anyway.

Evert

PS. There are still some global variables in there, but it shouldn't be too 
hard to remove these in an upcoming release.




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