loop: Rename UpdateAndDraw -> Update

This commit is contained in:
Hajime Hoshi 2017-08-05 20:14:49 +09:00
parent f0d47312c4
commit 9f98ccc611
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ func (c *graphicsContext) drawToDefaultRenderTarget() error {
return nil
}
func (c *graphicsContext) UpdateAndDraw(updateCount int) error {
func (c *graphicsContext) Update(updateCount int) error {
if err := c.initializeIfNeeded(); err != nil {
return err
}

View File

@ -81,7 +81,7 @@ func (c *runContext) updateFPS(fps float64) {
type GraphicsContext interface {
SetSize(width, height int, scale float64)
UpdateAndDraw(updateCount int) error
Update(updateCount int) error
Invalidate()
}
@ -195,7 +195,7 @@ func (c *runContext) render(g GraphicsContext) error {
c.m.Unlock()
count := c.updateCount(n)
if err := g.UpdateAndDraw(count); err != nil {
if err := g.Update(count); err != nil {
return err
}
c.framesForFPS++