ui/app: add Lock/Unlock to Context for macOS

Without locking, asynchronous OpenGL rendering crashes on macOS.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-05-24 14:01:26 +02:00
parent c3ea85801c
commit a1c0693eeb
8 changed files with 41 additions and 0 deletions
+4
View File
@@ -114,6 +114,10 @@ func (c *context) Functions() *gl.Functions {
return c.c
}
func (c *context) Lock() {}
func (c *context) Unlock() {}
func (c *context) MakeCurrent() error {
w, width, height := c.driver.nativeWindow(int(c.eglCtx.visualID))
win := _EGLNativeWindowType(w)