From 0ed1e8b6d801aff0b93e6b9aed449beafd718964 Mon Sep 17 00:00:00 2001 From: thefiddler Date: Tue, 29 Apr 2014 08:48:49 +0200 Subject: [PATCH] [Win] Log wglSwapIntervalEXT errors Note that we cannot use Marshal.GetLastWin32Error because we are not using regular DllImports for WGL extensions. --- Source/OpenTK/Platform/Windows/WinGLContext.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/Windows/WinGLContext.cs b/Source/OpenTK/Platform/Windows/WinGLContext.cs index 74a5009a..b7da272a 100644 --- a/Source/OpenTK/Platform/Windows/WinGLContext.cs +++ b/Source/OpenTK/Platform/Windows/WinGLContext.cs @@ -331,7 +331,10 @@ namespace OpenTK.Platform.Windows { value = 1; } - Wgl.Ext.SwapInterval(value); + if (!Wgl.Ext.SwapInterval(value)) + { + Debug.Print("wglSwapIntervalEXT call failed."); + } } } }