feat(framework): inicializar contexto ImPlot3D en app_base

ImPlot3D::CreateContext() / DestroyContext() acoplado al ciclo de
vida de ImPlot. Cualquier app que use fn::run_app obtiene el contexto
3D listo sin codigo extra.

Issue 0028.
This commit is contained in:
2026-04-25 21:48:34 +02:00
parent e7ab06ee29
commit 7159ee6dcb
+3
View File
@@ -4,6 +4,7 @@
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include "implot.h"
#include "implot3d.h"
#include "core/tokens.h"
#include "core/icon_font.h"
#include "core/app_settings.h"
@@ -51,6 +52,7 @@ int run_app(AppConfig config, std::function<void()> render_fn) {
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImPlot::CreateContext();
ImPlot3D::CreateContext();
ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
@@ -163,6 +165,7 @@ int run_app(AppConfig config, std::function<void()> render_fn) {
// Cleanup
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImPlot3D::DestroyContext();
ImPlot::DestroyContext();
ImGui::DestroyContext();
glfwDestroyWindow(window);