Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Windows: a local named far (a macro in windows.h) broke the MSVC build

islandmed1e722639fb6f
diff --git a/src/core/Multires.cpp b/src/core/Multires.cpp
index 9af9c940..8f5506b2 100644
--- a/src/core/Multires.cpp
+++ b/src/core/Multires.cpp
@@ -205,15 +205,15 @@ std::shared_ptr<SubdivTopology> buildCoarse(const std::vector<glm::uvec3>& trian
if (u < t) continue;
const int e = quadDiagonalOf(triangles, t, u);
const glm::uvec3& b = triangles[u];
- uint32_t far = 0;
+ uint32_t opposite = 0; // (not "far": a macro in windows.h)
for (uint32_t k = 0; k < 3; ++k)
- if (b[k] != a[0] && b[k] != a[1] && b[k] != a[2]) far = k;
+ if (b[k] != a[0] && b[k] != a[1] && b[k] != a[2]) opposite = k;
for (int c : {(e + 1) % 3, (e + 2) % 3, e}) {
tp->polyVerts.push_back(a[c]);
}
- tp->polyVerts.push_back(b[far]);
+ tp->polyVerts.push_back(b[opposite]);
tp->polyTris.push_back({t, u});
- tp->polyDiag.push_back(uint8_t(e | far << 2));
+ tp->polyDiag.push_back(uint8_t(e | opposite << 2));
}
tp->polyOffsets.push_back(uint32_t(tp->polyVerts.size()));
}