mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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
|
// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteFramebuffers.xml
|
||||||
if c.lastFramebuffer == f {
|
if c.lastFramebuffer == f {
|
||||||
c.lastFramebuffer = ZeroFramebuffer
|
c.lastFramebuffer = ZeroFramebuffer
|
||||||
|
c.lastViewportWidth = 0
|
||||||
|
c.lastViewportHeight = 0
|
||||||
}
|
}
|
||||||
gl.DeleteFramebuffers(1, &ff)
|
gl.DeleteFramebuffers(1, &ff)
|
||||||
return nil
|
return nil
|
||||||
|
@ -230,6 +230,8 @@ func (c *Context) DeleteFramebuffer(f Framebuffer) {
|
|||||||
// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteFramebuffers.xml
|
// https://www.khronos.org/opengles/sdk/docs/man/xhtml/glDeleteFramebuffers.xml
|
||||||
if c.lastFramebuffer == f {
|
if c.lastFramebuffer == f {
|
||||||
c.lastFramebuffer = ZeroFramebuffer
|
c.lastFramebuffer = ZeroFramebuffer
|
||||||
|
c.lastViewportWidth = 0
|
||||||
|
c.lastViewportHeight = 0
|
||||||
}
|
}
|
||||||
gl.DeleteFramebuffer(f.Object)
|
gl.DeleteFramebuffer(f.Object)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user