mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
gpu: reset to the default framebuffer on reset
The macOS backend doesn't re-create contexts, holding on to the first created instead. Make sure the GPU leaves the default framebuffer bound, in case the context is re-used. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user