diff --git a/app/internal/window/gl_macos.go b/app/internal/window/gl_macos.go index bbbfda6e..9b229ab5 100644 --- a/app/internal/window/gl_macos.go +++ b/app/internal/window/gl_macos.go @@ -50,6 +50,11 @@ func (c *context) Release() { c.Lock() defer c.Unlock() C.gio_clearCurrentContext() + // We could release the context with [view clearGLContext] + // and rely on [view openGLContext] auto-creating a new context. + // However that second context is not properly set up by + // OpenGLContextView, so we'll stay on the safe side and keep + // the first context around. } func (c *context) Present() error { diff --git a/gpu/gpu.go b/gpu/gpu.go index 1010ff3d..49da6ef9 100644 --- a/gpu/gpu.go +++ b/gpu/gpu.go @@ -354,6 +354,7 @@ func (g *GPU) BeginFrame() { g.ctx.SetBlend(false) g.renderer.pather.stenciler.invalidateFBO() g.coverTimer.end() + g.ctx.BindFramebuffer(g.defFBO) } func (g *GPU) EndFrame() {