[Mesa-dev] egl_glx [PATCH] Added eglSwapInterval support via GLX_EXT_swap_control

Joseph Bates dostende at gmail.com
Sun Aug 28 19:17:40 PDT 2011

I've been playing around with egl_glx lately and noticed it was missing
something I wanted. A quick look at source revealed it'd be an easy
addition. This is my first time contributing to Mesa.

Honestly, I tried setting up a Mesa dev environment, but I never quite got
it working. That shouldn't make my code go to waste though! I was hoping
someone could take a look at the code and if you think it's sound, maybe fix
any compiler errors there might be and give it a test run.

There's a minor difference between how EGL handles swap intervals and how
GLX_EXT_swap_control does it. The MaxSwapInterval in EGL is per-config, but
GLX_EXT_swap_control does it per-drawable. My trick around this is to just
assume double-buffered configs have a MaxSwapInterval of at least 1 (which
is a reasonable assumption I think), and on the off chance that they don't,
still report they do to the EGL user and silently ignore it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110828/11900c04/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: egl_glx-SwapInterval.patch
Type: text/x-patch
Size: 4580 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110828/11900c04/attachment.bin>

More information about the mesa-dev mailing list