[OpenTK] Register GraphicsContext and NativeWindow

This commit is contained in:
thefiddler 2014-07-23 14:35:33 +02:00
parent ab75ca05c4
commit 6abca6ddf7
2 changed files with 4 additions and 1 deletions

View file

@ -150,6 +150,7 @@ namespace OpenTK.Graphics
implementation = factory.CreateGLContext(mode, window, shareContext, direct_rendering, major, minor, flags);
handle_cached = ((IGraphicsContextInternal)implementation).Context;
factory.RegisterResource(this);
}
AddContext(this);

View file

@ -102,7 +102,9 @@ namespace OpenTK
this.options = options;
this.device = device;
implementation = Factory.Default.CreateNativeWindow(x, y, width, height, title, mode, options, this.device);
IPlatformFactory factory = Factory.Default;
implementation = factory.CreateNativeWindow(x, y, width, height, title, mode, options, this.device);
factory.RegisterResource(this);
if ((options & GameWindowFlags.Fullscreen) != 0)
{