From 5bb3d5bccf7b6de9e9b63f279bdd7f2546c42842 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 14 Sep 2024 21:38:18 +0200 Subject: [PATCH] Fix amalgamated build on osx. --- sfw/render_gui/imgui_impl_opengl3.cpp | 4 ++++ tools/merger/sfw_3rd.x.inl | 4 ++++ tools/merger/sfw_full.cpp.inl | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/sfw/render_gui/imgui_impl_opengl3.cpp b/sfw/render_gui/imgui_impl_opengl3.cpp index ec63abe..65acab8 100644 --- a/sfw/render_gui/imgui_impl_opengl3.cpp +++ b/sfw/render_gui/imgui_impl_opengl3.cpp @@ -177,7 +177,11 @@ // Vertex arrays are not supported on ES2/WebGL1 unless Emscripten which uses an extension #ifndef IMGUI_IMPL_OPENGL_ES2 + +#idndef __APPLE__ #define IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY +#endif + #elif defined(__EMSCRIPTEN__) #define IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY #define glBindVertexArray glBindVertexArrayOES diff --git a/tools/merger/sfw_3rd.x.inl b/tools/merger/sfw_3rd.x.inl index ae6b938..c36c1dc 100644 --- a/tools/merger/sfw_3rd.x.inl +++ b/tools/merger/sfw_3rd.x.inl @@ -30,8 +30,12 @@ #ifdef SFW_3RD_IMPL #define STB_TRUETYPE_IMPLEMENTATION +#define STB_RECT_PACK_IMPLEMENTATION +#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION #endif //SFW_3RD_IMPL +{{FILE:sfw/render_gui/imstb_rectpack.h}} + {{FILE:sfw/render_core/3rd_stb_truetype.h}} #ifdef SFW_3RD_IMPL diff --git a/tools/merger/sfw_full.cpp.inl b/tools/merger/sfw_full.cpp.inl index 7de9f33..528a5ce 100644 --- a/tools/merger/sfw_full.cpp.inl +++ b/tools/merger/sfw_full.cpp.inl @@ -1007,6 +1007,12 @@ static void stb_textedit_replace(ImGuiInputTextState* str, STB_TexteditState* st //--STRIP {{FILE:sfw/render_gui/imgui_tables.cpp}} +//#define STBRP_STATIC +//#define STBRP_ASSERT(x) do { IM_ASSERT(x); } while (0) +//#define STBRP_SORT ImQsort +//#define STB_RECT_PACK_IMPLEMENTATION +//{{F I L E:sfw/render_gui/imstb_rectpack.h}} + //--STRIP //#include "imgui.h" //#include "imgui_internal.h"