Re: [AD] Expose events in OS X |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2009-04-21, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> Peter Wang wrote:
> >
> > Typically (especially in proper programs, not examples) you have enough
> > information to recreate the screen, so there's not any need for Allegro
> > to handle expose events. I suppose Allegro could handle it more
> > efficiently?
> >
>
> Well, the reason why I would find it desirable would be more
> cross-platform-ness. Nobody developing their A5 program under OSX or Windows
> will understand what good those expose events do or why you should constantly
> update the backbuffer. X11 just is so much more stupid than Windows and OSX here :/
Well, it makes a lot of sense when you think about the hardware at the
time and the simple graphics of typical GUI apps. It must have seemed
very wasteful to keep a copy of each window (including obscured ones),
when most windows are basically flat colour.
> Previously it seemed like we'd have to somehow keep a copy of the screen
> contents, so it simply was impossible for Allegro to do this anyway. The way
> glxSwapBuffer() works (sometimes), it actually would be possible now to
> implement a solution.
>
> Still, the reason why I posted was mainly to say that it's actually quite simple
> to redraw the contents under a typical X11 by calling al_flip_display() - with
> no change to the library required :) We could simply ignore that and leave our
> examples to do the complicated (but always correct) way or maybe also show a
> somewhat sloppy but much easier solution :)
Isn't the backbuffer undefined after a al_flip_display() call, so it
would be relying on platform-specific behaviour?
Peter