fix uninitialized shader variable

This commit is contained in:
2022-02-21 14:01:09 +08:00
parent 4a9afb4246
commit 203b77c32f
4 changed files with 19 additions and 15 deletions

View File

@@ -10,6 +10,7 @@ import (
"edgaru089.ml/go/gl01/internal/igwrap"
"edgaru089.ml/go/gl01/internal/igwrap/backend"
"edgaru089.ml/go/gl01/internal/io"
"edgaru089.ml/go/gl01/internal/util"
"edgaru089.ml/go/gl01/internal/util/itype"
"edgaru089.ml/go/gl01/internal/world"
"github.com/go-gl/glfw/v3.3/glfw"
@@ -22,6 +23,8 @@ type guiState struct {
lastframeCgoCalls int64
lastCountSec *util.Clock
loadChunkFile string
loadChunkID [2]int32
@@ -56,6 +59,10 @@ func (g *Game) imgui() {
io.Diagnostics.CgoCalls = runtime.NumCgoCall() - g.gui.lastframeCgoCalls
g.gui.lastframeCgoCalls = runtime.NumCgoCall()
/*if g.gui.lastCountSec.Elapsed() >= time.Second {
g.gui.lastCountSec.Restart()
}*/
if io.ShowDebugInfo {
imgui.SetNextWindowPosV(imgui.Vec2{}, imgui.ConditionAlways, imgui.Vec2{})
imgui.SetNextWindowSize(imgui.Vec2{X: float32(io.DisplaySize[0]), Y: float32(io.DisplaySize[1])})