mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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 {
|
func (c *Context) SetViewport(f Framebuffer, width, height int) error {
|
||||||
lf := c.lastFramebuffer
|
|
||||||
c.bindFramebuffer(f)
|
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 {
|
if err := c.setViewportImpl(width, height); err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user