Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Graphics] Init OpenTK when creating external context

Fixes issue #52
  • Loading branch information...
commit 242b8bbe6c145a7fa400d56702a655522d558624 1 parent 625ba5d
thefiddler thefiddler authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 Source/OpenTK/Graphics/GraphicsContext.cs
4 Source/OpenTK/Graphics/GraphicsContext.cs
View
@@ -188,6 +188,10 @@ public GraphicsContext(ContextHandle handle, GetAddressDelegate getAddress, GetC
if (getAddress == null || getCurrent == null)
throw new ArgumentNullException();
+ // Make sure OpenTK has been initialized.
+ // Fixes https://github.com/opentk/opentk/issues/52
+ Toolkit.Init();
+
lock (SyncRoot)
{
// Replace a zero-handle by the current context, if any
Please sign in to comment.
Something went wrong with that request. Please try again.