Re: [AD] 4.3 display update methods

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


On Monday 24 July 2006 14:39, Peter Hull wrote:
> The thing is, there's nothing AFAICS in OpenGL (or D3D) that
> guarantees that your front buffer is always retained*.

No, but if you're drawing to the back buffer, you'll clear it up with the next 
update. If you're drawing to the front buffer, you'd be using a 
dirty-rectangle-like system (or otherwise could have your own buffer), and 
would check for display update events to clear it up. There's no dire need to 
keep a copy of the front buffer.

> However, there may be performance issues. For example, on my (slightly
> old) iBook, requesting a retained OpenGL context is incompatible with
> the hardware renderer. In D3D there is an indication you can get
> better performance by telling it that the backbuffer need not be
> preserved.

I mean, preserve the front buffer for when the system wants to make it 'dirty' 
for whatever reason.

> Thinking about our target audience, the choice they should be thinking
> about is "Do I want to handle redraws myself or let Allegro do it?",
> not "Do I want to implement a dirty rectangle system on a front buffer
> or use the back buffer"

The two are rather synonymous.
Handle redraws yourself - dirty rectangles - draw to front buffer/screen
Allegro handles redraws - buffered drawing - draw to back buffer and flip




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