From d5fd02d8eb387b477678ffbfb44303a38c105607 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 24 Apr 2025 12:25:33 -0700 Subject: Some draft ideas on simulation --- src/ui.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/ui.cpp (limited to 'src/ui.cpp') diff --git a/src/ui.cpp b/src/ui.cpp new file mode 100644 index 0000000..bc88394 --- /dev/null +++ b/src/ui.cpp @@ -0,0 +1,17 @@ +#include "ui.hpp" +#include "ogl.hpp" +#include "sandbox.hpp" + +#include + +void ShowEverything() { + ImGui::Begin("Sandbox"); + constexpr int kWidth = 40; + constexpr int kHeight = 100; + static bool running = false; + static Sandbox sandbox(40, 100); + static OglImage gl; + sandbox.simulate_step(); + gl.upload(reinterpret_cast(sandbox._bitmap.data()), kWidth, kHeight); + ImGui::End(); +} -- cgit v1.2.3-70-g09d2