mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
graphics: Remove unneeded clearing
This commit is contained in:
parent
c7783b2ecf
commit
e4a7d9bde4
@ -128,7 +128,6 @@ func (c *graphicsContext) UpdateAndDraw(context *opengl.Context, updateCount int
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
for i := 0; i < updateCount; i++ {
|
for i := 0; i < updateCount; i++ {
|
||||||
// TODO: This clears images not needed to be cleared (e.g. c.screen).
|
|
||||||
if err := theImagesForRestoring.clearVolatileImages(); err != nil {
|
if err := theImagesForRestoring.clearVolatileImages(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -138,9 +137,6 @@ func (c *graphicsContext) UpdateAndDraw(context *opengl.Context, updateCount int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if 0 < updateCount {
|
if 0 < updateCount {
|
||||||
if err := c.offscreen2.Clear(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := drawWithFittingScale(c.offscreen2, c.offscreen); err != nil {
|
if err := drawWithFittingScale(c.offscreen2, c.offscreen); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user