mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
opengl: Bug fix: Reset viewport when framebuffer delation
This commit is contained in:
parent
12904d168d
commit
26ef56232b
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user