diff --git a/internal/graphics/opengl/context_desktop.go b/internal/graphics/opengl/context_desktop.go index 2037c10c4..a7421c84f 100644 --- a/internal/graphics/opengl/context_desktop.go +++ b/internal/graphics/opengl/context_desktop.go @@ -254,6 +254,8 @@ func (c *Context) DeleteFramebuffer(f Framebuffer) { // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteFramebuffers.xml if c.lastFramebuffer == f { c.lastFramebuffer = ZeroFramebuffer + c.lastViewportWidth = 0 + c.lastViewportHeight = 0 } gl.DeleteFramebuffers(1, &ff) return nil diff --git a/internal/graphics/opengl/context_js.go b/internal/graphics/opengl/context_js.go index 8576d9f94..b6627d1f2 100644 --- a/internal/graphics/opengl/context_js.go +++ b/internal/graphics/opengl/context_js.go @@ -230,6 +230,8 @@ func (c *Context) DeleteFramebuffer(f Framebuffer) { // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteFramebuffers.xml if c.lastFramebuffer == f { c.lastFramebuffer = ZeroFramebuffer + c.lastViewportWidth = 0 + c.lastViewportHeight = 0 } gl.DeleteFramebuffer(f.Object) }