[Graphics] Init OpenTK when creating external context

Fixes issue #52
This commit is contained in:
thefiddler 2014-03-13 19:51:29 +01:00
parent 625ba5dcda
commit 242b8bbe6c

View file

@ -188,6 +188,10 @@ namespace OpenTK.Graphics
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