diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..ab0ee4729 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Build directories +build*/ \ No newline at end of file diff --git a/src/rocky/vsg/ecs/WidgetSystem.cpp b/src/rocky/vsg/ecs/WidgetSystem.cpp index 63f3b73b5..17e3a2094 100644 --- a/src/rocky/vsg/ecs/WidgetSystem.cpp +++ b/src/rocky/vsg/ecs/WidgetSystem.cpp @@ -13,7 +13,10 @@ #include #include #include + +#ifdef ROCKY_HAS_IMGUI #include +#endif using namespace ROCKY_NAMESPACE; @@ -59,6 +62,7 @@ WidgetSystemNode::WidgetSystemNode(Registry& in_registry) : void WidgetSystemNode::initialize(VSGContext& context) { +#ifdef ROCKY_HAS_IMGUI // register me as a gui rendering callback. auto recorder = [this](detail::RenderingState& rs, void* imguiContext) { @@ -114,6 +118,7 @@ WidgetSystemNode::initialize(VSGContext& context) }; context->guiRecorders.emplace_back(recorder); +#endif // ROCKY_HAS_IMGUI } void diff --git a/src/rocky/vsg/imgui/ImGuiIntegration.h b/src/rocky/vsg/imgui/ImGuiIntegration.h index 817b73cb8..388826188 100644 --- a/src/rocky/vsg/imgui/ImGuiIntegration.h +++ b/src/rocky/vsg/imgui/ImGuiIntegration.h @@ -9,6 +9,8 @@ #include #include #include + +#ifdef ROCKY_HAS_IMGUI #include /** @@ -162,3 +164,5 @@ namespace ROCKY_NAMESPACE }; } } + +#endif // ROCKY_HAS_IMGUI diff --git a/src/rocky/vsg/imgui/RenderImGui.h b/src/rocky/vsg/imgui/RenderImGui.h index 04718bd6b..b520d6824 100644 --- a/src/rocky/vsg/imgui/RenderImGui.h +++ b/src/rocky/vsg/imgui/RenderImGui.h @@ -24,6 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include +#ifdef ROCKY_HAS_IMGUI #include #include @@ -98,3 +99,5 @@ namespace ROCKY_NAMESPACE // temporary workaround for Dear ImGui's nonexistent sRGB awareness //extern void ImGuiStyle_sRGB_to_linear(ImGuiStyle& style); } + +#endif // ROCKY_HAS_IMGUI diff --git a/src/rocky/vsg/imgui/SendEventsToImGui.cpp b/src/rocky/vsg/imgui/SendEventsToImGui.cpp index d9a328fa6..da1b7537a 100644 --- a/src/rocky/vsg/imgui/SendEventsToImGui.cpp +++ b/src/rocky/vsg/imgui/SendEventsToImGui.cpp @@ -22,6 +22,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "SendEventsToImGui.h" + +#ifdef ROCKY_HAS_IMGUI #include #include @@ -309,4 +311,6 @@ void SendEventsToImGui::apply(vsg::FrameEvent& /*frame*/) io.DeltaTime = std::chrono::duration_cast>(t1 - t0).count(); t0 = t1; -} \ No newline at end of file +} + +#endif // ROCKY_HAS_IMGUI \ No newline at end of file diff --git a/src/rocky/vsg/imgui/SendEventsToImGui.h b/src/rocky/vsg/imgui/SendEventsToImGui.h index 466884aa9..fdffec6d1 100644 --- a/src/rocky/vsg/imgui/SendEventsToImGui.h +++ b/src/rocky/vsg/imgui/SendEventsToImGui.h @@ -27,6 +27,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include + +#ifdef ROCKY_HAS_IMGUI #include namespace ROCKY_NAMESPACE @@ -59,3 +61,5 @@ namespace ROCKY_NAMESPACE }; } +#endif // ROCKY_HAS_IMGUI +