From d7fade41bf6641e98e0a95b1c78e70e5470f247d Mon Sep 17 00:00:00 2001 From: James Barnett Date: Wed, 8 Aug 2018 21:09:28 +0100 Subject: Render GPU output as OpenGL texture --- src/main/kotlin/gui/EmulationOutputWindow.kt | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/main/kotlin/gui/EmulationOutputWindow.kt') diff --git a/src/main/kotlin/gui/EmulationOutputWindow.kt b/src/main/kotlin/gui/EmulationOutputWindow.kt index 14fe246..3f57d5a 100644 --- a/src/main/kotlin/gui/EmulationOutputWindow.kt +++ b/src/main/kotlin/gui/EmulationOutputWindow.kt @@ -1,15 +1,22 @@ package gui import glm_.vec2.Vec2 -import imgui.Cond -import imgui.ImGui +import imgui.* -fun paintEmulationOutputWindow() { +fun paintEmulationOutputWindow(frame: TextureID) { with(ImGui) { - setNextWindowSize(Vec2(640, 576), Cond.FirstUseEver) + + pushStyleVar(StyleVar.WindowPadding, Vec2(0)) + + setNextWindowSize(Vec2(640, 596), Cond.FirstUseEver) setNextWindowPos(Vec2(620, 10), Cond.FirstUseEver) - begin("Emulation output - 4x scale") - text("TODO - actually render something...") + + begin("Emulation output - 4x scale", flags_ = WindowFlag.NoScrollbar or WindowFlag.NoResize) + + image(frame, Vec2(640,576)) + end() + + popStyleVar() } } \ No newline at end of file -- cgit v1.2.3