From 9b4159cecca754d54da1bc3465a756386ef5f7fe Mon Sep 17 00:00:00 2001 From: Michael Tsukanov Date: Fri, 5 Sep 2025 01:08:38 +0300 Subject: [PATCH 1/4] remove non-existent function calls `ImGui_ImplOpenGL3_DestroyFontsTexture` and `ImGui_ImplOpenGL3_CreateFontsTexture` were removed on 04.06.2025 --- src/render/opengl/gl_engine_glfw.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/render/opengl/gl_engine_glfw.cpp b/src/render/opengl/gl_engine_glfw.cpp index 5f49aa20..1d96fce8 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(); } From f325c67ea60dd08ebc7bc6a28bb46cdc50db9d17 Mon Sep 17 00:00:00 2001 From: Michael Tsukanov Date: Fri, 5 Sep 2025 01:52:16 +0300 Subject: [PATCH 2/4] Add explicit GLM_ENABLE_EXPERIMENTAL --- deps/MarchingCubeCpp/include/MarchingCube/MC.h | 3 +++ include/polyscope/check_invalid_values.h | 5 ++++- include/polyscope/context.h | 3 +++ include/polyscope/elementary_geometry.h | 5 ++++- include/polyscope/numeric_helpers.h | 5 ++++- include/polyscope/utilities.h | 3 +++ src/elementary_geometry.cpp | 5 ++++- src/transformation_gizmo.cpp | 3 +++ 8 files changed, 28 insertions(+), 4 deletions(-) diff --git a/deps/MarchingCubeCpp/include/MarchingCube/MC.h b/deps/MarchingCubeCpp/include/MarchingCube/MC.h index 62e6c378..7382e45e 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/include/polyscope/check_invalid_values.h b/include/polyscope/check_invalid_values.h index 9ea9ea61..881b80b5 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 085be831..60ea8df9 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 7b01c936..542dd8ee 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 f451b7b7..3b61d673 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 0ae03717..d45456e1 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/transformation_gizmo.cpp b/src/transformation_gizmo.cpp index 25c25f88..bcd9e054 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 From db431c1c20ac93ad06712c1f284a5e74b7e274b8 Mon Sep 17 00:00:00 2001 From: Michael Tsukanov Date: Wed, 10 Sep 2025 14:11:01 +0300 Subject: [PATCH 3/4] Make stb implementation static --- deps/stb/stb_impl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/stb/stb_impl.cpp b/deps/stb/stb_impl.cpp index 82928fa0..512f6f63 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" From d83a0e420e33e06787600c4bd6351042fe28563d Mon Sep 17 00:00:00 2001 From: Nicholas Sharp Date: Wed, 10 Dec 2025 23:47:47 -0800 Subject: [PATCH 4/4] Revert "remove non-existent function calls" This reverts commit 9b4159cecca754d54da1bc3465a756386ef5f7fe. --- src/render/opengl/gl_engine_glfw.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/render/opengl/gl_engine_glfw.cpp b/src/render/opengl/gl_engine_glfw.cpp index 1d96fce8..5f49aa20 100644 --- a/src/render/opengl/gl_engine_glfw.cpp +++ b/src/render/opengl/gl_engine_glfw.cpp @@ -169,8 +169,14 @@ 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(); }