File tree Expand file tree Collapse file tree 6 files changed +47
-2
lines changed
Expand file tree Collapse file tree 6 files changed +47
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,6 @@ add_library(atta_ui_module STATIC
4141 ${ATTA_UI_MODULE_SOURCE}
4242)
4343
44- target_link_libraries (atta_ui_module PRIVATE atta_graphics_module atta_io_module atta_component_module ${ATTA_IMGUIZMO_TARGETS} ${ATTA_IMPLOT_TARGETS} )
44+ target_link_libraries (atta_ui_module PRIVATE atta_graphics_module atta_io_module atta_component_module ${ATTA_IMGUIZMO_TARGETS} ${ATTA_IMPLOT_TARGETS} ${ATTA_IMPLOT3D_TARGETS} )
4545atta_target_common(atta_ui_module)
4646atta_add_libs(atta_ui_module)
Original file line number Diff line number Diff line change 1010#include < atta/ui/editor/editor.h>
1111#include < imgui_internal.h>
1212#include < implot.h>
13+ #include < implot3d.h>
1314
1415#include < atta/ui/editor/moduleWindows/graphicsModuleWindow.h>
1516#include < atta/ui/editor/moduleWindows/ioModuleWindow.h>
@@ -33,6 +34,7 @@ void Editor::render() {
3334 bool demo = true ;
3435 ImGui::ShowDemoWindow (&demo);
3536 // ImPlot::ShowDemoWindow(&demo);
37+ // ImPlot3D::ShowDemoWindow(&demo);
3638
3739 // Top interface
3840 _topBar.render ();
Original file line number Diff line number Diff line change 1919#endif
2020#include < ImGuizmo.h>
2121#include < implot.h>
22+ #include < implot3d.h>
2223// clang-format on
2324
2425namespace atta ::ui {
@@ -32,6 +33,7 @@ void Manager::startUpImpl() {
3233 IMGUI_CHECKVERSION ();
3334 ImGui::CreateContext ();
3435 ImPlot::CreateContext ();
36+ ImPlot3D::CreateContext ();
3537
3638 ImGuiIO& io = ImGui::GetIO ();
3739 (void )io;
@@ -72,6 +74,11 @@ void Manager::shutDownImpl() {
7274 // Make sure all rendering operations are done
7375 gfx::getGraphicsAPI ()->waitDevice ();
7476
77+ // Destroy plotting contexts
78+ ImPlot3D::DestroyContext ();
79+ ImPlot::DestroyContext ();
80+
81+ // Destroy ImGui context
7582 switch (gfx::getGraphicsAPI ()->getType ()) {
7683 case gfx::GraphicsAPI::OPENGL:
7784 ImGui_ImplOpenGL3_Shutdown ();
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ include(solveAssimp)
2626include (solveStbImage)
2727include (solveImguizmo)
2828include (solveImplot)
29+ include (solveImplot3d)
2930include (solveBox2d)
3031include (solveBullet)
3132include (solveSystemd)
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ endif()
2828add_library (imgui STATIC
2929 ${IMGUI_SOURCE}
3030)
31- target_include_directories (imgui PUBLIC
31+ target_include_directories (imgui PUBLIC
3232 $<BUILD_INTERFACE:${FETCHCONTENT_BASE_DIR} /imgui-src>
3333 $<INSTALL_INTERFACE:include /${ATTA_VERSION_SAFE} /extern/imgui>
3434)
Original file line number Diff line number Diff line change 1+ set (ATTA_IMPLOT3D_SUPPORT FALSE )
2+ set (ATTA_IMPLOT3D_TARGETS "" )
3+
4+ FetchContent_Declare(
5+ implot3d
6+ GIT_REPOSITORY "https://github.com/brenocq/implot3d"
7+ GIT_TAG "v0.1"
8+ GIT_PROGRESS TRUE
9+ GIT_SHALLOW TRUE
10+ )
11+
12+ atta_log(Info Extern "Fetching ImPlot3D..." )
13+ FetchContent_MakeAvailable(implot3d)
14+
15+ set (IMPLOT3D_SOURCE
16+ ${FETCHCONTENT_BASE_DIR} /implot3d-src/implot3d.cpp
17+ ${FETCHCONTENT_BASE_DIR} /implot3d-src/implot3d_demo.cpp
18+ ${FETCHCONTENT_BASE_DIR} /implot3d-src/implot3d_items.cpp
19+ ${FETCHCONTENT_BASE_DIR} /implot3d-src/implot3d_meshes.cpp
20+ )
21+ add_library (implot3d STATIC
22+ ${IMPLOT3D_SOURCE}
23+ )
24+ target_include_directories (implot3d PUBLIC
25+ $<BUILD_INTERFACE:${FETCHCONTENT_BASE_DIR} /implot3d-src>
26+ $<INSTALL_INTERFACE:include /${ATTA_VERSION_SAFE} /extern/implot3d>
27+ )
28+ target_link_libraries (implot3d PRIVATE glfw imgui)
29+
30+ atta_add_include_dirs(${FETCHCONTENT_BASE_DIR} /implot3d-src)
31+ atta_add_libs(implot3d)
32+
33+ atta_log(Success Extern "ImPlot support (source)" )
34+ set (ATTA_IMPLOT3D_SUPPORT TRUE )
35+ set (ATTA_IMPLOT3D_TARGETS implot3d)
You can’t perform that action at this time.
0 commit comments