[nostalgia/core] Setup Imgui drawing
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <imgui.h>
|
||||
#include <imgui_impl_glfw.h>
|
||||
|
||||
#include <nostalgia/core/userland/gfx.hpp>
|
||||
|
||||
@@ -18,7 +19,7 @@ namespace nostalgia::core {
|
||||
constexpr auto Scale = 5;
|
||||
|
||||
static void handleGlfwError(int err, const char *desc) {
|
||||
oxErrf("GLFW error ({}): {}", err, desc);
|
||||
oxErrf("GLFW error ({}): {}\n", err, desc);
|
||||
}
|
||||
|
||||
ox::Error initGfx(Context *ctx) noexcept {
|
||||
@@ -39,7 +40,10 @@ ox::Error initGfx(Context *ctx) noexcept {
|
||||
glfwMakeContextCurrent(id->window);
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
auto &io = ImGui::GetIO();
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
io.MouseDrawCursor = true;
|
||||
ImGui_ImplGlfw_InitForOpenGL(id->window, true);
|
||||
oxReturnError(renderer::init(ctx));
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user