mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
Remove calling gl.checkFramebufferStatus
This commit is contained in:
parent
449bc7931d
commit
447bda7d68
@ -132,13 +132,7 @@ func (c *Context) SetViewport(f Framebuffer, width, height int) error {
|
|||||||
} else {
|
} else {
|
||||||
gl.BindFramebuffer(gl.FRAMEBUFFER, nullVal)
|
gl.BindFramebuffer(gl.FRAMEBUFFER, nullVal)
|
||||||
}
|
}
|
||||||
err := gl.CheckFramebufferStatus(gl.FRAMEBUFFER)
|
// gl.CheckFramebufferStatus might cause a performance problem. Don't call this here.
|
||||||
if err != gl.FRAMEBUFFER_COMPLETE {
|
|
||||||
if gl.GetError() != 0 {
|
|
||||||
return errors.New(fmt.Sprintf("glBindFramebuffer failed: %d", gl.GetError()))
|
|
||||||
}
|
|
||||||
return errors.New("glBindFramebuffer failed: the context is different?")
|
|
||||||
}
|
|
||||||
gl.Viewport(0, 0, width, height)
|
gl.Viewport(0, 0, width, height)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user