Re: [AD] al_update_display_region |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Thu, 2009-02-26 at 17:02 +0200, Milan Mimica wrote:
>
> I see. That works too, but I was thinking something more than that.
> Our official position is: the contents of the backbuffer are undefined
> after al_flip_display(). OK, that works, you render the whole
> backbuffer and try to save some resources by indicating the rectangle
> that has changed since the last frame. It will either flip, or update
> the whole buffer area, or update only the specified region, or
> transfer data through space shuttle...
>
> I was thinking we could bend the rules a bit, since we also have
> ALLEGRO_SWAP_METHOD display option which would allow you to choose a
> buffer copy update method. Then you could render to the backbuffer
> only the portion of the screen that has changed and update only that
> region(s). How evil is that?
> I should also mention that currently no driver supports both
> ALLEGRO_SWAP_METHOD and al_update_display_region() in a reliable way
> :)
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).
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.
--
Elias Pschernig <elias@xxxxxxxxxx>