Use Wgl.Import.GetCurrentContext DllImport directly
authorStefanos A. <stapostol@gmail.com>
Fri, 27 Sep 2013 16:55:38 +0000 (18:55 +0200)
committerStefanos A. <stapostol@gmail.com>
Fri, 27 Sep 2013 16:55:38 +0000 (18:55 +0200)
Wgl is implemented using the regular DllImport + delegate approach, in
order to support extensions. The delegates have not been armed at this
point, so we need to use the DllImport directly.

The whole wgl API should be revisited (we are using only a tiny
portion.)

Source/OpenTK/Platform/SDL2/Sdl2Factory.cs

index 46870ea05398b2ff2bc3b1f9e28fb9d0944c6415..cc3fa75382ff9533d00e617732b6854829da9d04 100644 (file)
@@ -40,7 +40,7 @@ namespace OpenTK.Platform.SDL2
             {
                 IntPtr current;
                 if (Configuration.RunningOnWindows)
-                    current = OpenTK.Platform.Windows.Wgl.GetCurrentContext();
+                    current = OpenTK.Platform.Windows.Wgl.Imports.GetCurrentContext();
                 else if (Configuration.RunningOnX11)
                     current = OpenTK.Platform.X11.Glx.GetCurrentContext();
                 else if (Configuration.RunningOnMacOS)