FlipY texture flag, display world texture atlas

This commit is contained in:
2022-02-16 00:29:34 +08:00
parent 326253a73b
commit 565e0390f3
6 changed files with 86 additions and 17 deletions

View File

@@ -55,17 +55,14 @@ func (g *Game) imgui() {
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])})
if igwrap.Begin("F3", nil, imgui.WindowFlagsAlwaysAutoResize|imgui.WindowFlagsNoBackground|imgui.WindowFlagsNoNavFocus|imgui.WindowFlagsNoDecoration|imgui.WindowFlagsNoInputs|imgui.WindowFlagsNoSavedSettings|imgui.WindowFlagsNoFocusOnAppearing) {
bg := itype.Vec4f{0, 0, 0, 0.5}
pad := igwrap.Vec2f(imgui.CurrentStyle().ItemSpacing())
igwrap.TextBackground(bg, pad, "Gl01 compiled by %s/%s [%s/%s] (120AVG) %.1f FPS (%.3f frame)", runtime.Compiler, runtime.Version(), runtime.GOOS, runtime.GOARCH, imgui.CurrentIO().Framerate(), 1000/imgui.CurrentIO().Framerate())
igwrap.TextBackground(bg, pad, "GLFW %s, Dear ImGUI %s", glfw.GetVersionString(), imgui.Version())
igwrap.TextBackground(bg, pad, "CgoCalls:%d (%d lastframe), Goroutines:%d", runtime.NumCgoCall(), runtime.NumCgoCall()-g.gui.lastframeCgoCalls, runtime.NumGoroutine())
imgui.Dummy(imgui.Vec2{X: 8, Y: 8})
if igwrap.Begin("F3", nil, igwrap.WindowFlagsOverlay) {
igwrap.TextBackground("Gl01 compiled by %s/%s [%s/%s] (120AVG) %.1f FPS (%.3f frame)", runtime.Compiler, runtime.Version(), runtime.GOOS, runtime.GOARCH, imgui.CurrentIO().Framerate(), 1000/imgui.CurrentIO().Framerate())
igwrap.TextBackground("GLFW %s, Dear ImGUI %s", glfw.GetVersionString(), imgui.Version())
igwrap.TextBackground("CgoCalls:%d (%d lastframe), Goroutines:%d", runtime.NumCgoCall(), runtime.NumCgoCall()-g.gui.lastframeCgoCalls, runtime.NumGoroutine())
igwrap.TextBlank()
pos := g.player.Position()
igwrap.TextBackground(bg, pad, "Player: (%.3f, %.5f, %.3f) (Y%.2f, Z%.2f)", pos[0], pos[1], pos[2], g.rotY.Degrees(), g.rotZ)
igwrap.TextBackground("Player: (%.3f, %.5f, %.3f) (Y%.2f, Z%.2f)", pos[0], pos[1], pos[2], g.rotY.Degrees(), g.rotZ)
imgui.End()
}
}