We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a3f647 commit 83bdf53Copy full SHA for 83bdf53
1 file changed
src/graphics/mesh/glb.cpp
@@ -135,6 +135,7 @@ void GLBLoader::handleNode(int node_id, GLBFile::Node& node)
135
if (node_json.find("mesh") != node_json.end()) {
136
auto& mesh = json["meshes"][static_cast<int>(node_json["mesh"])];
137
for(auto& primitive : mesh["primitives"]) {
138
+ if (static_cast<int>(primitive["mode"]) != 4) continue; // Only import triangle primitives
139
auto& p_a = json["accessors"][static_cast<int>(primitive["attributes"]["POSITION"])];
140
auto& p_b = json["bufferViews"][static_cast<int>(p_a["bufferView"])];
141
auto& n_a = json["accessors"][static_cast<int>(primitive["attributes"]["NORMAL"])];
0 commit comments