Skip to content

Commit

Permalink
Use correct var name in the triangle mesh sample
Browse files Browse the repository at this point in the history
PR #3 pointed out some typos in the "how to load a triangle mesh" sample code. One of them was an undefined variable, `propIdx`, when checking whether we need to triangulate the face data. I noticed after merging the PR that it was attempting to work around a typo I'd made in the variable name: it should actually have been `indexes[0]` (or `*indexes`) instead. I'm just fixing that up here.
  • Loading branch information
vilya committed Oct 29, 2020
1 parent c6aec44 commit 48b37d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ TriMesh* load_trimesh_from_ply(const char* filename)
gotVerts = true;
}
else if (reader.element_is(miniply::kPLYFaceElement) && reader.load_element() && reader.find_indices(indexes)) {
uint32_t propIdx;
bool polys = reader.requires_triangulation(propIdx);
bool polys = reader.requires_triangulation(indexes[0]);
if (polys && !gotVerts) {
fprintf(stderr, "Error: need vertex positions to triangulate faces.\n");
break;
Expand Down

0 comments on commit 48b37d4

Please sign in to comment.