diff --git a/deps/MarchingCubeCpp/include/MarchingCube/MC.h b/deps/MarchingCubeCpp/include/MarchingCube/MC.h index 62e6c3781..7382e45e3 100644 --- a/deps/MarchingCubeCpp/include/MarchingCube/MC.h +++ b/deps/MarchingCubeCpp/include/MarchingCube/MC.h @@ -5,6 +5,9 @@ #include // Added by nsharp: use glm instead of internal vector class +#ifndef GLM_ENABLE_EXPERIMENTAL +#define GLM_ENABLE_EXPERIMENTAL +#endif #include #include diff --git a/deps/stb/stb_impl.cpp b/deps/stb/stb_impl.cpp index 82928fa0f..512f6f63f 100644 --- a/deps/stb/stb_impl.cpp +++ b/deps/stb/stb_impl.cpp @@ -1,3 +1,4 @@ +#define STB_IMAGE_STATIC #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" diff --git a/include/polyscope/check_invalid_values.h b/include/polyscope/check_invalid_values.h index 9ea9ea614..881b80b5d 100644 --- a/include/polyscope/check_invalid_values.h +++ b/include/polyscope/check_invalid_values.h @@ -6,6 +6,9 @@ #include #include +#ifndef GLM_ENABLE_EXPERIMENTAL +#define GLM_ENABLE_EXPERIMENTAL +#endif #include #include #include @@ -24,4 +27,4 @@ void checkInvalidValues(std::string name, const std::vector& data) { } } -} // namespace polyscope \ No newline at end of file +} // namespace polyscope diff --git a/include/polyscope/context.h b/include/polyscope/context.h index 085be8311..60ea8df90 100644 --- a/include/polyscope/context.h +++ b/include/polyscope/context.h @@ -6,6 +6,9 @@ #include #include +#ifndef GLM_ENABLE_EXPERIMENTAL +#define GLM_ENABLE_EXPERIMENTAL +#endif #include #include #include diff --git a/include/polyscope/elementary_geometry.h b/include/polyscope/elementary_geometry.h index 7b01c9364..542dd8ee6 100644 --- a/include/polyscope/elementary_geometry.h +++ b/include/polyscope/elementary_geometry.h @@ -5,6 +5,9 @@ #include #include +#ifndef GLM_ENABLE_EXPERIMENTAL +#define GLM_ENABLE_EXPERIMENTAL +#endif #include namespace polyscope { @@ -18,4 +21,4 @@ glm::vec3 projectToPlane(glm::vec3 queryP, glm::vec3 planeNormal, glm::vec3 poin // Compute the signed area of triangle ABC which lies in the plane give by normal float signedTriangleArea(glm::vec3 normal, glm::vec3 pA, glm::vec3 pB, glm::vec3 pC); -} // namespace polyscope \ No newline at end of file +} // namespace polyscope diff --git a/include/polyscope/numeric_helpers.h b/include/polyscope/numeric_helpers.h index f451b7b7f..3b61d6736 100644 --- a/include/polyscope/numeric_helpers.h +++ b/include/polyscope/numeric_helpers.h @@ -3,6 +3,9 @@ #pragma once #include +#ifndef GLM_ENABLE_EXPERIMENTAL +#define GLM_ENABLE_EXPERIMENTAL +#endif #include #include #include @@ -124,4 +127,4 @@ inline bool allComponentsFinite>(const std::array +#ifndef GLM_ENABLE_EXPERIMENTAL +#define GLM_ENABLE_EXPERIMENTAL +#endif #include diff --git a/src/elementary_geometry.cpp b/src/elementary_geometry.cpp index 0ae037176..d45456e13 100644 --- a/src/elementary_geometry.cpp +++ b/src/elementary_geometry.cpp @@ -6,6 +6,9 @@ #include #include +#ifndef GLM_ENABLE_EXPERIMENTAL +#define GLM_ENABLE_EXPERIMENTAL +#endif #include namespace polyscope { @@ -32,4 +35,4 @@ float signedTriangleArea(glm::vec3 normal, glm::vec3 pA, glm::vec3 pB, glm::vec3 return sign * area; } -} // namespace polyscope \ No newline at end of file +} // namespace polyscope diff --git a/src/render/opengl/gl_engine_glfw.cpp b/src/render/opengl/gl_engine_glfw.cpp index 5f49aa200..1d96fce87 100644 --- a/src/render/opengl/gl_engine_glfw.cpp +++ b/src/render/opengl/gl_engine_glfw.cpp @@ -169,14 +169,8 @@ void GLEngineGLFW::configureImGui() { ImGuiIO& io = ImGui::GetIO(); io.Fonts->Clear(); - // these are necessary if different fonts are loaded in the callback - // (don't totally understand why, allegedly it may change in the future) - ImGui_ImplOpenGL3_DestroyFontsTexture(); - ImFontAtlas* _unused; std::tie(_unused, regularFont, monoFont) = options::prepareImGuiFontsCallback(); - - ImGui_ImplOpenGL3_CreateFontsTexture(); } diff --git a/src/transformation_gizmo.cpp b/src/transformation_gizmo.cpp index 25c25f88b..bcd9e0541 100644 --- a/src/transformation_gizmo.cpp +++ b/src/transformation_gizmo.cpp @@ -4,6 +4,9 @@ #include "polyscope/polyscope.h" +#ifndef GLM_ENABLE_EXPERIMENTAL +#define GLM_ENABLE_EXPERIMENTAL +#endif #include #include