Re: [AD] al_update_display_region

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


On Thu, 2009-02-26 at 18:06 +0200, Milan Mimica wrote:
> 2009/2/26 Elias Pschernig <elias.pschernig@xxxxxxxxxx>:
> >
> > The question is, how reliably can D3D/WGL/GLX/OSX-GL drivers tell us
> > about the swap method? Also, would it require any changes? As far as I
> > can see, a swap method of COPY means you can treat the display as if it
> > were a single buffer (and the behavior of al_update_display_region in
> > current SVN then should be correct).
> 
> Yes, the current SVN is correct. But you still have to draw the whole
> backbuffer, in case it fails and drops back to plain
> al_flip_display(). And with all current drivers you'll still want to
> do that.

Only in a double buffered mode though. And usually you would only use
al_update_display_region in single buffer mode (and usually you would
not use it at all.. I just felt it was appropriate to use where I used
it in ex_font, even if it makes most sense to be the same as
al_flip_display there :P).

> 
> > Also, while I updated the docs for the new display options, I was
> > thinking ALLEGRO_DOUBLEBUFFERED is named wrong, as it is also used for
> > page flipping/triple buffering/undefined method. Maybe we should rename
> > it to ALLEGRO_SINGLEBUFFER (with reversed meaning of course) and remove
> > the display flag of the same name.
> 
> Sounds reasonable. DOUBLEBUFFERED is hardly a word.
> 

Ok, I tried doing this with current SVN. I *think* I understood all the
code I modified for WGL/D3D/OSX-GL and adjusted it correctly - people
who can compile and test each of those should make sure though :) Also,
as I said in the commit message, this might not be the last change, it's
not really clear why e.g. ALLEGRO_FULLSCREEN is passed to
al_set_new_display_flags and not al_set_new_display_option...

Also, I noticed that ex_expose now fail here because it uses this:

al_set_new_display_format(ALLEGRO_PIXEL_FORMAT_ANY_32_NO_ALPHA);

Looking at allegro.log, it wants to select a mode where color_size == 32
but alpha_size == 0... which is somewhat impossible. Didn't look yet how
to fix it in case you already know a way.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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