[Mac] Use Cgl.GetCurrentContext instead of Agl
authorthefiddler <stapostol@gmail.com>
Sat, 28 Dec 2013 00:04:22 +0000 (01:04 +0100)
committerthefiddler <stapostol@gmail.com>
Sat, 28 Dec 2013 00:04:22 +0000 (01:04 +0100)
CGL appears to work with both AGL and NSOpenGL contexts, whereas AGL is
limited to AGL contexts. This allows us to be more flexible in terms of
implementation (i.e. we can use Cgl.GetCurrentContext to retrieve a
handle to a context created through SDL, which uses NSOpenGL
internally.)

Source/OpenTK/Platform/MacOS/MacOSFactory.cs

index ad54031..97473c2 100644 (file)
@@ -70,7 +70,7 @@ namespace OpenTK.Platform.MacOS
         {
             return (GraphicsContext.GetCurrentContextDelegate)delegate
             {
-                return new ContextHandle(Agl.aglGetCurrentContext());
+                return new ContextHandle(Cgl.GetCurrentContext());
             };
         }