mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-08-01 19:08:54 +00:00
Fixed triangle fan indices
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
This commit is contained in:
@@ -157,7 +157,7 @@ bool LoadGLTF(const std::string &filename, float scale,
|
||||
// Push back the indices that describe just one triangle one by one
|
||||
for (size_t i{2}; i < triangleFan.size(); ++i) {
|
||||
loadedMesh.faces.push_back(triangleFan[0]);
|
||||
loadedMesh.faces.push_back(triangleFan[1]);
|
||||
loadedMesh.faces.push_back(triangleFan[i - 1]);
|
||||
loadedMesh.faces.push_back(triangleFan[i]);
|
||||
}
|
||||
}
|
||||
@@ -473,4 +473,4 @@ bool LoadGLTF(const std::string &filename, float scale,
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
} // namespace example
|
||||
} // namespace example
|
||||
|
||||
Reference in New Issue
Block a user