Re: [AD] Expose events in OS X

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


Peter Wang wrote:

Then it's acting exactly as intended.  Expose events are only required on
non-retained mode window systems.  There, if part of your window was
previously obscured by another window and is now "exposed" (visible)
you need to redraw at least that part of the window otherwise you'll
see junk in that part of the screen.

I changed this in the X11 port so you now see black instead of junk. I don't think this will have any negative consequences, but looks somewhat less broken.

This probably needs to be made clear in the documentation, or
al_create_display() should fail if expose events are required.

It shouldn't fail.  Just ignore the flag.


I also made another little discovery - GLX actually always keeps the contents of each OpenGL window (if double buffering is used) and only X11 itself forgets them. Therefore calling glXSwapBuffers() on a window repairs any damage from being obscured by other windows.

Maybe should mention this in the docs somewhere and also simplify the examples accordingly? Basically there is no need to redraw anything manually, just calling al_flip_display() is enough.

--
Elias Pschernig <elias@xxxxxxxxxx>




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