[OpenTK] Register GraphicsContext and NativeWindow
This commit is contained in:
parent
ab75ca05c4
commit
6abca6ddf7
2 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue