File tree Expand file tree Collapse file tree 6 files changed +34
-9
lines changed Expand file tree Collapse file tree 6 files changed +34
-9
lines changed Original file line number Diff line number Diff line change 8787[submodule "3rdparty/imgui "]
8888 path = 3rdparty/imgui
8989 url = git@github.com:ocornut/imgui.git
90+ [submodule "3rdparty/implot "]
91+ path = 3rdparty/implot
92+ url = git@github.com:epezent/implot.git
Original file line number Diff line number Diff line change @@ -250,6 +250,24 @@ if(NBL_BUILD_IMGUI)
250250 PUBLIC "imgui/backends"
251251 )
252252
253+ # ImPlot
254+ add_library (implot STATIC
255+ "implot/implot.h"
256+ "implot/implot_internal.h"
257+ "implot/implot.cpp"
258+ "implot/implot_items.cpp"
259+ )
260+ target_include_directories (implot
261+ PUBLIC "imgui"
262+ )
263+ target_link_libraries (implot PUBLIC imgui)
264+ target_compile_definitions (implot PUBLIC IMPLOT_DEBUG IMPLOT_DLL_EXPORT)
265+ set_property (TARGET implot PROPERTY CXX_STANDARD 11)
266+ if (MSVC )
267+ target_compile_options (implot PRIVATE /MT /W4 /WX /arch:AVX2 /fp:fast /permissive-)
268+ else ()
269+ target_compile_options (implot PRIVATE -Wall -Wextra -pedantic -Werror -mavx2 -Ofast)
270+ endif ()
253271endif ()
254272
255273add_library (aesGladman OBJECT
Original file line number Diff line number Diff line change @@ -238,7 +238,11 @@ macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUD
238238 target_link_libraries (${LIB_NAME} PUBLIC Nabla)
239239 target_compile_options (${LIB_NAME} PUBLIC ${LIB_OPTIONS} )
240240 target_compile_definitions (${LIB_NAME} PUBLIC ${DEF_OPTIONS} )
241- set_target_properties (${LIB_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
241+ if (NBL_DYNAMIC_MSVC_RUNTIME)
242+ set_target_properties (${LIB_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" )
243+ else ()
244+ set_target_properties (${LIB_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
245+ endif ()
242246
243247 if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
244248 add_compile_options (
Original file line number Diff line number Diff line change 11#ifndef NBL_EXT_IMGUI_UI_H
22#define NBL_EXT_IMGUI_UI_H
33
4- #include < glm/vec3.hpp>
54
65namespace nbl ::ext::imgui
76{
8- class NBL_API2 UI final : public core::IReferenceCounted{
7+ class UI final : public core::IReferenceCounted{
98 public:
109
11- explicit UI (
10+ UI (
1211 core::smart_refctd_ptr<video::ILogicalDevice> device,
1312 int maxFramesInFlight,
1413 core::smart_refctd_ptr<video::IGPURenderpass>& renderPass,
@@ -52,7 +51,7 @@ namespace nbl::ext::imgui
5251
5352 void InputFloat4 (char const * label, float * value);
5453
55- void InputFloat3 (char const * label, glm::vec3 & value);
54+ void InputFloat3 (char const * label, nbl::core::vector3df & value);
5655
5756 bool Combo (
5857 char const * label,
Original file line number Diff line number Diff line change @@ -879,14 +879,14 @@ namespace nbl::ext::imgui
879879
880880 // -------------------------------------------------------------------------------------------------
881881
882- void UI::InputFloat3 (char const * label, glm::vec3& value)
882+ void UI::InputFloat3 (char const * label, nbl::core::vector3df& value)
883883 {
884- float tempValue[3 ]{ value.x , value.y , value.z };
884+ float tempValue[3 ]{ value.X , value.Y , value.Z };
885885 InputFloat3 (label, tempValue);
886886
887- if (memcmp (tempValue, &value[ 0 ] , sizeof (float ) * 3 ) != 0 )
887+ if (memcmp (tempValue, &value. X , sizeof (float ) * 3 ) != 0 )
888888 {
889- memcpy (&value[ 0 ] , tempValue, sizeof (float ) * 3 );
889+ memcpy (&value. X , tempValue, sizeof (float ) * 3 );
890890 }
891891 }
892892
You can’t perform that action at this time.
0 commit comments