Re: [AD] al_update_display_region

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


2009/2/26 Elias Pschernig <elias.pschernig@xxxxxxxxxx>:
>>
>> I don't think it should be a flag, but a option.
>> al_get_display_option(ALLEGRO_UPDATE_DISPLAY_REGION) will indicate whether
>> a) al_update_display_region() does nothing
>> b) acts as a hint
>> c) does what the name says
>>
>
> Well, a) is not needed if we require drivers to always implement it -
> and I think we should. There really is no reason to allow NULL entries
> in vtables. Changed it accordingly in SVN (Windows and OSX versions are
> untested, I hope I didn't break anything there).

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
:)



-- 
Milan Mimica
http://sparklet.sf.net




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