Commit 1c80e990 authored by Camilla Berglund's avatar Camilla Berglund
Browse files

Added forcing of swap interval on DWM composition.

parent 0e12fb86
......@@ -16,6 +16,10 @@ option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
option(GLFW_INSTALL "Generate installation target" ON)
option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF)
if (WIN32)
option(GLFW_USE_DWM_SWAP_INTERVAL "Set swap interval even when DWM compositing is enabled" OFF)
if (APPLE)
option(GLFW_BUILD_UNIVERSAL "Build GLFW as a Universal Binary" OFF)
option(GLFW_USE_CHDIR "Make glfwInit chdir to Contents/Resources" ON)
......@@ -151,6 +155,10 @@ if (_GLFW_WIN32)
list(APPEND glfw_LIBRARIES winmm)
......@@ -72,6 +72,10 @@ directory of bundled applications to the `Contents/Resources` directory.
`USE_MSVC_RUNTIME_LIBRARY_DLL` determines whether to use the DLL version or the
static library version of the Visual C++ runtime library.
`GLFW_USE_DWM_SWAP_INTERVAL` determines whether the swap interval is set even
when DWM compositing is enabled. This can lead to severe jitter and is not
usually recommended.
#### EGL specific options
......@@ -101,6 +105,8 @@ See the [GLFW 3.0 documentation](
- Bugfix: The `-Wall` flag was not used with Clang and other GCC compatibles
- Bugfix: The default for `GLFW_ALPHA_BITS` was set to zero
- [Win32] Added `_GLFW_USE_DWM_SWAP_INTERVAL` for forcing the swap interval
to be set even when DWM compositing is enabled
- [Win32] Bugfix: The clipboard string was not freed on terminate
- [Win32] Bugfix: Entry points for OpenGL 1.0 and 1.1 functions were not
returned by `glfwGetProcAddress`
......@@ -56,6 +56,8 @@
// Define this to 1 to disable dynamic loading of winmm
#cmakedefine _GLFW_NO_DLOAD_WINMM
// Define this to 1 if glfwSwapInterval should ignore DWM compositing status
// Define this to 1 if glXGetProcAddress is available
......@@ -600,12 +600,14 @@ void _glfwPlatformSwapInterval(int interval)
_GLFWwindow* window = _glfwPlatformGetCurrentContext();
if (_glfwIsCompositionEnabled())
// Don't enabled vsync when desktop compositing is enabled, as it leads
// to frame jitter
if (window->wgl.EXT_swap_control)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment