Re: [AD] Expose events in OS X

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


Evert Glebbeek wrote:


I wouldn't rely on undefined behavior. It's bound to break somewhere, sometime.

Yeah, it's why only some of our example programs would rely on it. The thing is, it makes the code quite a bit simpler, and if our assumption how GLX works breaks, under Windows and OSX it still would work perfectly, and in the X11 port there would be a graphical glitch whenever your Allegro window was obscured by another window (many of our example have that very glitch right now anyway simply because they don't bother to do the complex expose event handling).


Would it be possible to have Allegro do the buffering (optionally)?
(Yes, of course it'd be possible, I mean feasible/useful)


Very easy - just need to hook into al_get_next_event() (so it would work like in SDL, GLFW and so on) so we can do the drawing from the user thread.

But I think we said previously that adding a hook to al_get_next_event just to get something like this is not worth it.

It also would add a restriction so the user would have to make sure to only draw to a display from the same thread in which they handle the display's events (about 100% of all practical scenarios would do so anyway, and doing it differently actually might not even work on all platforms right now).

--
Elias Pschernig <elias@xxxxxxxxxx>




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