func onPaint() { if scene == nil { loadScene() } gl.ClearColor(1, 1, 1, 1) gl.Clear(gl.COLOR_BUFFER_BIT) now := clock.Time(time.Since(startTime) * 60 / time.Second) eng.Render(scene, now, sz) debug.DrawFPS(sz) }
func onPaint(c size.Event) { loadScene() now := clock.Time(time.Since(startTime) * 60 / time.Second) eng.Render(scene, now, c) }