aboutsummaryrefslogtreecommitdiff
path: root/src/ui.cpp
blob: bc883941566cece244f5108a2d64ef23cb81e9e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "ui.hpp"
#include "ogl.hpp"
#include "sandbox.hpp"

#include <imgui.h>

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<const char*>(sandbox._bitmap.data()), kWidth, kHeight);
    ImGui::End();
}