Use GLArea MakeCurrent method.

This commit is contained in:
Jarl Gullberg 2017-09-15 12:42:28 +02:00
parent 9dd03dd769
commit ed126403b3
No known key found for this signature in database
GPG key ID: FBB69BD7CAE095A0

View file

@ -298,7 +298,7 @@ namespace OpenTK
} }
// Make the GDK GL context current // Make the GDK GL context current
Context.MakeCurrent(); MakeCurrent();
// Create an OpenTK graphics context using the GdkGLContext as a foreign context // Create an OpenTK graphics context using the GdkGLContext as a foreign context
// Since the GDK context is already created and has been made current, we can retrieve its handle. // Since the GDK context is already created and has been made current, we can retrieve its handle.
@ -306,7 +306,8 @@ namespace OpenTK
GetRequiredVersion(out int glVersionMajor, out int glVersionMinor); GetRequiredVersion(out int glVersionMajor, out int glVersionMinor);
_GraphicsContext = new GraphicsContext(gdkContextHandle, _WindowInfo, null, glVersionMajor, glVersionMinor, GraphicsContextFlags); _GraphicsContext = new GraphicsContext(gdkContextHandle, _WindowInfo, null, glVersionMajor, glVersionMinor, GraphicsContextFlags);
_GraphicsContext.MakeCurrent(_WindowInfo);
MakeCurrent();
if (GraphicsContext.ShareContexts) if (GraphicsContext.ShareContexts)
{ {