diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-08-08 21:09:28 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-08-08 21:09:28 +0100 |
| commit | d7fade41bf6641e98e0a95b1c78e70e5470f247d (patch) | |
| tree | 3df666dc3a296943ce543363e65460c138e54ea9 /src/main/kotlin/gui/EmulationOutputWindow.kt | |
| parent | 3a3733052672b1c23ae240bd19f71e13336c600b (diff) | |
| download | KGB-d7fade41bf6641e98e0a95b1c78e70e5470f247d.tar.xz KGB-d7fade41bf6641e98e0a95b1c78e70e5470f247d.zip | |
Render GPU output as OpenGL texture
Diffstat (limited to 'src/main/kotlin/gui/EmulationOutputWindow.kt')
| -rw-r--r-- | src/main/kotlin/gui/EmulationOutputWindow.kt | 19 |
1 files changed, 13 insertions, 6 deletions
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 |