[nostaliga,turbine] Move rest of ImGui init to Turbine

This commit is contained in:
Gary Talent 2023-06-03 01:07:38 -05:00
parent 37f6c388fc
commit 6593d429fe
4 changed files with 5 additions and 7 deletions

View File

@ -2,8 +2,6 @@
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <imgui_impl_opengl3.h>
#include <ox/std/array.hpp>
#include <ox/std/fmt.hpp>
#include <ox/std/vec.hpp>
@ -324,7 +322,6 @@ ox::Error initGfx(Context *ctx, const InitParams &initParams) noexcept {
turbine::gl::addDrawer(*ctx->turbineCtx, &gctx->drawer);
initSpritesBufferset(ctx, gctx->spriteShader, &gctx->spriteBlocks);
}
ImGui_ImplOpenGL3_Init(glutils::GlslVersion);
return {};
}

View File

@ -1,9 +1,6 @@
add_library(
NostalgiaCore-Studio OBJECT
#import_tilesheet_wizard.cpp
module.cpp
#new_tilesheet_wizard.cpp
#newpalettewizard.cpp
paletteeditor.cpp
paletteeditor-imgui.cpp
tilesheeteditor-imgui.cpp
@ -19,7 +16,7 @@ endif()
target_link_libraries(
NostalgiaCore-Studio PUBLIC
NostalgiaStudio
Studio
NostalgiaCore
lodepng
)

View File

@ -5,6 +5,7 @@
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <imgui_impl_glfw.h>
#include <imgui_impl_opengl3.h>
#include <ox/std/defines.hpp>
@ -228,6 +229,7 @@ ox::Error initGfx(Context &ctx) noexcept {
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
//io.MouseDrawCursor = true;
ImGui_ImplGlfw_InitForOpenGL(gctx.window, true);
ImGui_ImplOpenGL3_Init();
themeImgui();
}
return {};

View File

@ -84,6 +84,8 @@ ox::Error run(Context &ctx) noexcept {
void shutdown(Context &ctx) noexcept {
auto &gctx = static_cast<GlfwContext&>(ctx);
if (gctx.window) {
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
glfwDestroyWindow(gctx.window);
gctx.window = nullptr;
}