aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle2
-rw-r--r--src/main/kotlin/gui/WindowContainer.kt11
2 files changed, 7 insertions, 6 deletions
diff --git a/build.gradle b/build.gradle
index 5f657cb..6f74489 100644
--- a/build.gradle
+++ b/build.gradle
@@ -30,7 +30,7 @@ test {
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
- compile 'com.github.kotlin-graphics:imgui:v1.62-beta-02'
+ compile 'com.github.kotlin-graphics:imgui:v1.63-beta-01'
switch (OperatingSystem.current()) {
case OperatingSystem.WINDOWS:
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)