Merge pull request #1 from h1k421/fix/macOS-cocoa-fix

Fix OpenGL context creation on macOS
This commit is contained in:
emmauss 2020-04-29 20:21:12 +00:00 committed by GitHub
commit 0b409d641a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,13 +332,13 @@ namespace OpenTK
{
IntPtr windowHandle = gdk_quartz_window_get_nswindow(this.Window.Handle);
//IntPtr viewHandle = gdk_quartz_window_get_nsview(this.GdkWindow.Handle);
return Utilities.CreateMacOSCarbonWindowInfo(windowHandle, true, true);
return Utilities.CreateMacOSWindowInfo(windowHandle);
}
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-quartz-2.0.0.dylib")]
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-3.0.dylib")]
static extern IntPtr gdk_quartz_window_get_nswindow(IntPtr handle);
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-quartz-2.0.0.dylib")]
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-3.0.dylib")]
static extern IntPtr gdk_quartz_window_get_nsview(IntPtr handle);
#endregion