No swap interval on composition.

This commit is contained in:
Camilla Berglund
2013-03-11 20:54:32 +01:00
parent 54d1d14f59
commit 51ee3a5c0a
4 changed files with 60 additions and 1 deletions
+22
View File
@@ -86,6 +86,13 @@ static GLboolean initLibraries(void)
GetProcAddress(_glfw.win32.user32.instance, "SetProcessDPIAware");
}
_glfw.win32.dwmapi.instance = LoadLibrary(L"dwmapi.dll");
if (_glfw.win32.dwmapi.instance)
{
_glfw.win32.dwmapi.DwmIsCompositionEnabled = (DWMISCOMPOSITIONENABLED_T)
GetProcAddress(_glfw.win32.dwmapi.instance, "DwmIsCompositionEnabled");
}
return GL_TRUE;
}
@@ -107,6 +114,21 @@ static void freeLibraries(void)
////// GLFW internal API //////
//////////////////////////////////////////////////////////////////////////
// Returns whether desktop compositing is enabled
//
BOOL _glfwIsCompositionEnabled(void)
{
BOOL enabled;
if (!_glfw_DwmIsCompositionEnabled)
return FALSE;
if (_glfw_DwmIsCompositionEnabled(&enabled) != S_OK)
return FALSE;
return enabled;
}
// Returns a wide string version of the specified UTF-8 string
//
WCHAR* _glfwCreateWideStringFromUTF8(const char* source)