we're ready for tenants

This commit is contained in:
2025-12-19 13:48:48 +08:00
parent b20abbe803
commit afc9904651
4 changed files with 22 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ import (
"edgaru089.ink/go/gl01/internal/game"
gio "edgaru089.ink/go/gl01/internal/io"
_ "edgaru089.ink/go/gl01/internal/render/gpu_preference"
"edgaru089.ink/go/gl01/internal/util"
"edgaru089.ink/go/gl01/internal/util/itype"
"github.com/go-gl/gl/all-core/gl"
"github.com/go-gl/glfw/v3.3/glfw"
@@ -70,15 +71,14 @@ func main() {
gl.ClearColor(gio.ClearColor[0], gio.ClearColor[1], gio.ClearColor[2], gio.ClearColor[3])
gl.Clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)
win.SwapBuffers()
winClock := time.Now()
winClock := util.NewClock()
fpsClock := time.Now()
fpsCounter := 0
for !win.ShouldClose() {
deltaTime := time.Since(winClock)
winClock = time.Now()
deltaTime := winClock.Restart()
game.Update(win, deltaTime)
gl.ClearColor(gio.ClearColor[0], gio.ClearColor[1], gio.ClearColor[2], gio.ClearColor[3])