graphics: Dispose mipmap images for the offscreen every frame

This commit is contained in:
Hajime Hoshi 2018-07-30 00:03:34 +09:00
parent 20c8d7317c
commit c720c8e1cb

View File

@ -92,6 +92,7 @@ func (c *graphicsContext) Update(afterFrameUpdate func()) error {
} }
for i := 0; i < updateCount; i++ { for i := 0; i < updateCount; i++ {
c.offscreen.fill(0, 0, 0, 0) c.offscreen.fill(0, 0, 0, 0)
c.offscreen.disposeMipmaps()
setDrawingSkipped(i < updateCount-1) setDrawingSkipped(i < updateCount-1)
if err := hooks.RunBeforeUpdateHooks(); err != nil { if err := hooks.RunBeforeUpdateHooks(); err != nil {