Small fixes on OpenTK support.

This commit is contained in:
H. Utku Maden 2024-03-04 21:41:16 +03:00
parent cea243a3b8
commit 032a38e13b
2 changed files with 7 additions and 1 deletions

@ -37,6 +37,11 @@ namespace Quik.OpenTK
IsGLInitialized = true; IsGLInitialized = true;
} }
window.Closing += (ea) =>
{
Environment.Exit(0);
};
return port; return port;
} }

@ -72,6 +72,7 @@ namespace Quik.OpenTK
_vertexEngine.Reset(); _vertexEngine.Reset();
_vertexEngine.ProcessCommands(new QRectangle(), queue); _vertexEngine.ProcessCommands(new QRectangle(), queue);
if (!_window.Context.IsCurrent)
_window.Context.MakeCurrent(); _window.Context.MakeCurrent();
if (!_glDriver.IsInit) if (!_glDriver.IsInit)