mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-06-04 11:25:59 +08:00
Fixed triangle fan indices
Signed-off-by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
This commit is contained in:
parent
de8e3a6e6b
commit
c227c5bddb
@ -157,7 +157,7 @@ bool LoadGLTF(const std::string &filename, float scale,
|
|||||||
// Push back the indices that describe just one triangle one by one
|
// Push back the indices that describe just one triangle one by one
|
||||||
for (size_t i{2}; i < triangleFan.size(); ++i) {
|
for (size_t i{2}; i < triangleFan.size(); ++i) {
|
||||||
loadedMesh.faces.push_back(triangleFan[0]);
|
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]);
|
loadedMesh.faces.push_back(triangleFan[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -473,4 +473,4 @@ bool LoadGLTF(const std::string &filename, float scale,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace example
|
} // namespace example
|
||||||
|
Loading…
x
Reference in New Issue
Block a user