mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 10:42:42 +01:00
opengl: Remove unneeded glViewport calls
This commit is contained in:
parent
e9de66aca2
commit
56c4e71859
@ -52,9 +52,8 @@ func (c *Context) bindFramebuffer(f Framebuffer) error {
|
||||
}
|
||||
|
||||
func (c *Context) SetViewport(f Framebuffer, width, height int) error {
|
||||
lf := c.lastFramebuffer
|
||||
c.bindFramebuffer(f)
|
||||
if lf != f || c.lastViewportWidth != width || c.lastViewportHeight != height {
|
||||
if c.lastViewportWidth != width || c.lastViewportHeight != height {
|
||||
if err := c.setViewportImpl(width, height); err != nil {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user