Re: [AD] 4.3 display update methods

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


On 7/24/06, Chris <chris.kcat@xxxxxxxxxx> wrote:
its in and with the user is doing. Similar to OpenGL, just have an
accessible 'front' buffer and a 'back' buffer, and let the user pick which
to
draw to.. this way, they can choose to implement dirty rectangles by drawing
directly to the front buffer and not needing to flip, or they can stay
buffered and flip every completed frame.
The thing is, there's nothing AFAICS in OpenGL (or D3D) that
guarantees that your front buffer is always retained*.

The concept that you can just draw stuff and have it displayed is very
simple and appealing. In Allegro 4.3, it will be even simpler as the
blit(double_buffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H) idiom will
no longer be necessary. (Of course they will now have to call
al_flip(), but that's not too bad!)

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.

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"

Pete

* Say if the user starts another fullscreen OpenGL app, or changes the
screen resolution, or puts a laptop into suspend...




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