app,app/internal/wm: release OpenGL context after use

Otherwise, making a context current on another thread may result in
an EGL_BAD_ACCESS error.

Fixes gio#248

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-07-26 21:35:19 +02:00
parent 152a30f468
commit 7da315eb2b
6 changed files with 14 additions and 0 deletions
+1
View File
@@ -69,6 +69,7 @@ func (l *renderLoop) renderLoop(ctx wm.Context) error {
initErr <- err
return
}
defer ctx.ReleaseCurrent()
g, err := gpu.New(ctx.API())
if err != nil {
initErr <- err