[nostalgia/core] Setup Imgui drawing
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#define IMGUI_IMPL_OPENGL_ES3
|
||||
#include <imgui_impl_opengl3.h>
|
||||
#include <imgui_impl_glfw.h>
|
||||
|
||||
#include <ox/std/bit.hpp>
|
||||
#include <ox/std/fmt.hpp>
|
||||
@@ -269,11 +270,18 @@ void setBgStatus(Context *ctx, unsigned bg, bool status) noexcept {
|
||||
void draw(Context *ctx) noexcept {
|
||||
const auto id = ctx->rendererData<renderer::GlImplData>();
|
||||
renderer::tickFps(id);
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
ImGui_ImplGlfw_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
// clear screen
|
||||
glClearColor(0, 0, 0, 1);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
// render
|
||||
//bool showDemo = true;
|
||||
//ImGui::ShowDemoWindow(&showDemo);
|
||||
renderer::drawBackgrounds(id);
|
||||
ImGui::Render();
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
}
|
||||
|
||||
void clearTileLayer(Context *ctx, int layer) noexcept {
|
||||
|
||||
Reference in New Issue
Block a user