diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-07-21 19:07:16 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-07-21 19:07:16 +0100 |
| commit | 2861f2db6f918c48019c1ac3f91bf6a407452493 (patch) | |
| tree | db451bde7a552ac6bd8369e6ff0279a96b125600 /src/main/kotlin/gui/DebugWindow.kt | |
| parent | 7fd114712c1921cb03748d42deeb655f6b225cce (diff) | |
| download | KGB-2861f2db6f918c48019c1ac3f91bf6a407452493.tar.xz KGB-2861f2db6f918c48019c1ac3f91bf6a407452493.zip | |
Add imgui based debug window container
Diffstat (limited to 'src/main/kotlin/gui/DebugWindow.kt')
| -rw-r--r-- | src/main/kotlin/gui/DebugWindow.kt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/kotlin/gui/DebugWindow.kt b/src/main/kotlin/gui/DebugWindow.kt new file mode 100644 index 0000000..d80d2b3 --- /dev/null +++ b/src/main/kotlin/gui/DebugWindow.kt @@ -0,0 +1,14 @@ +package gui + +import glm_.vec2.Vec2 +import imgui.Cond +import imgui.ImGui + +fun paintDebugWindow() { + with(ImGui) { + setNextWindowPos(Vec2(20, 50), Cond.FirstUseEver) + begin("Debug info") + text("%.1f FPS (%.2f ms/frame)", io.framerate, 1_000f / io.framerate) + end() + } +}
\ No newline at end of file |