diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-08-08 21:28:44 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-08-08 21:28:44 +0100 |
| commit | 7b83b892bec7b540d4d8bac132084a2f5db6c195 (patch) | |
| tree | 44d2f4190c62c3a66e1310dd05f390efe56b7bc2 /src/main/kotlin/gui | |
| parent | d7fade41bf6641e98e0a95b1c78e70e5470f247d (diff) | |
| download | KGB-7b83b892bec7b540d4d8bac132084a2f5db6c195.tar.xz KGB-7b83b892bec7b540d4d8bac132084a2f5db6c195.zip | |
Update imgui to 1.63-beta1
Diffstat (limited to 'src/main/kotlin/gui')
| -rw-r--r-- | src/main/kotlin/gui/WindowContainer.kt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/kotlin/gui/WindowContainer.kt b/src/main/kotlin/gui/WindowContainer.kt index 60dc1e4..330f703 100644 --- a/src/main/kotlin/gui/WindowContainer.kt +++ b/src/main/kotlin/gui/WindowContainer.kt @@ -14,7 +14,8 @@ import imgui.Context import imgui.ImGui import imgui.TextureID import imgui.destroy -import imgui.impl.LwjglGL3 +import imgui.impl.ImplGL3 +import imgui.impl.LwjglGlfw import org.lwjgl.opengl.GL11 import org.lwjgl.opengl.GL30 import uno.glfw.GlfwWindow @@ -44,12 +45,12 @@ class WindowContainer { glfw.swapInterval = 1 val ctx = Context() - LwjglGL3.init(window) + LwjglGlfw.init(window) ImGui.styleColorsDark() window.loop(::mainLoop) - LwjglGL3.shutdown() + LwjglGlfw.shutdown() ctx.destroy() window.destroy() @@ -59,7 +60,7 @@ class WindowContainer { private fun mainLoop() { - LwjglGL3.newFrame() + LwjglGlfw.newFrame() val (texture, textureId) = createAndRegisterTexture(gameBoy.gpu.getFrame()) @@ -76,7 +77,7 @@ class WindowContainer { GL11.glClear(GL11.GL_COLOR_BUFFER_BIT) ImGui.render() - LwjglGL3.renderDrawData(ImGui.drawData!!) + ImplGL3.renderDrawData(ImGui.drawData!!) // TODO - render direct to framebuffer rather than creating and destroying texture each frame disposeTexture(texture, textureId) |