diff options
author | Sven Gothel <[email protected]> | 2015-08-27 13:15:44 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-08-27 13:15:44 +0200 |
commit | deff49c901915e007f43a1df1a0d217a786e9f06 (patch) | |
tree | 46b5c4ed38772c1f5d32498904da9318b3ecab83 /src/jogl/classes/jogamp/opengl/GLXExtensions.java | |
parent | 8b4f68a3a014c3ae62a64def3011ccc43e8c41c9 (diff) |
Bug 1202 - Add support of Adaptive Vsync via [GLX|WGL]_EXT_swap_control_tear
[GLX|WGL]_EXT_swap_control_tear extensions support
asynchronous buffer swaps, i.e. adaptive Vsync.
<https://www.opengl.org/wiki/SwapInterval_aka_vsync#Adaptive_Vsync>
<https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt>
<https://www.opengl.org/registry/specs/EXT/glx_swap_control_tear.txt>
<http://keithp.com/blogs/async_flip/>
The extensions utilizes a negative interval value,
enabling late swaps to occur without synchronization to the video frame.
Hence '-1' has new semantics, previously it was the 'default value'
of 'untouched vsync interval'.
New default is:
- 0 for unrealized context
- 1 for realized context
+++
It requires [GLX|WGL]_EXT_swap_control,
hence we shall ensure to use use this extension
in the implementation of GLContext.setSwapInterval(..).
+++
Mesa3D seems to support GLX_SGI_swap_control only.
+++
Implemented on Windows and X11.
+++
On GNU/Linux using NVidia driver w/ my setup(*), sadly the query
GLX.glXQueryDrawable(displayHandle, drawable.getHandle(), GLX.GLX_LATE_SWAPS_TEAR_EXT, val);
always returns zero here, indicating async vsync is not supported.
(Queried the attribute for every frame in windowed or fullscreen mode)
Fullscreen
(*)
- Debian 8
- Kernel 3.16
- KDE/Kwin
- GL Version 4.5 (Core profile, arb, compat[ES2, ES3, ES31], FBO, hardware) - 4.5.0 NVIDIA 355.06 [GL 4.5.0, vendor 355.6.0 (NVIDIA 355.06)]
- GL_RENDERER GeForce GTX 660/PCIe/SSE2
- Samsung U28D590 (DFP-4): Internal DisplayPort
+++
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLXExtensions.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLXExtensions.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLXExtensions.java b/src/jogl/classes/jogamp/opengl/GLXExtensions.java index 9325c6f68..db4757e4d 100644 --- a/src/jogl/classes/jogamp/opengl/GLXExtensions.java +++ b/src/jogl/classes/jogamp/opengl/GLXExtensions.java @@ -34,4 +34,10 @@ public class GLXExtensions { public static final String GLX_MESA_swap_control = "GLX_MESA_swap_control"; public static final String GLX_SGI_swap_control = "GLX_SGI_swap_control"; public static final String GLX_NV_swap_group = "GLX_NV_swap_group"; + + public static final String GLX_EXT_swap_control = "GLX_EXT_swap_control"; + public static final String GLX_EXT_swap_control_tear = "GLX_EXT_swap_control_tear"; + + public static final String WGL_EXT_swap_control = "WGL_EXT_swap_control"; + public static final String WGL_EXT_swap_control_tear = "WGL_EXT_swap_control_tear"; } |