Closed antoinecla closed 6 years ago
Good catch!
Indeed DeviceContext.GetCurrentContext()
is using WGL functions because it access to Egl.IsRequired
not being initialized yet.
The assertion is somewhat pedantic, but it's always a good idea to reset current GL context before device context disposition, isn't? On my system, calling wglGetCurrentContext
was returning zero, hiding the problem.
Step to reproduce:
OpenGL.Net\OpenGL.Net.WinForms\bin\net461\Debug\OpenGL.Net.WinForms.dll OpenGL.Net.WInforms
GlControl
Result: On start, assert: "leaving a context current". Clicking Ignore allows the application to run without other issues.
Stack trace: