[Win] Log wglSwapIntervalEXT errors
authorthefiddler <stapostol@gmail.com>
Tue, 29 Apr 2014 06:48:49 +0000 (08:48 +0200)
committerthefiddler <stapostol@gmail.com>
Tue, 29 Apr 2014 06:48:49 +0000 (08:48 +0200)
Note that we cannot use Marshal.GetLastWin32Error because we are not
using regular DllImports for WGL extensions.

Source/OpenTK/Platform/Windows/WinGLContext.cs

index 74a5009..b7da272 100644 (file)
@@ -331,7 +331,10 @@ namespace OpenTK.Platform.Windows
                         {
                             value = 1;
                         }
-                        Wgl.Ext.SwapInterval(value);
+                        if (!Wgl.Ext.SwapInterval(value))
+                        {
+                            Debug.Print("wglSwapIntervalEXT call failed.");
+                        }
                     }
                 }
             }