From d9eeb2bd908771920b618225b17db6a8e40ae150 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 26 Nov 2008 21:55:43 +0000 Subject: [PATCH] Add debug output to SwapBuffers. --- Source/OpenTK/Platform/Windows/WinGLContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/Windows/WinGLContext.cs b/Source/OpenTK/Platform/Windows/WinGLContext.cs index c08cda77..b0323fd2 100644 --- a/Source/OpenTK/Platform/Windows/WinGLContext.cs +++ b/Source/OpenTK/Platform/Windows/WinGLContext.cs @@ -138,8 +138,8 @@ namespace OpenTK.Platform.Windows public void SwapBuffers() { - - Functions.SwapBuffers(currentWindow.DeviceContext); + if (!Functions.SwapBuffers(currentWindow.DeviceContext)) + Debug.Print("SwapBuffers failed, error: {0}", Marshal.GetLastWin32Error()); } #endregion