aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSyoyo Fujita <syoyo@lighttransport.com>2016-07-10 00:11:37 +0900
committerSyoyo Fujita <syoyo@lighttransport.com>2016-07-10 00:11:37 +0900
commitd4a7eefc5462392dc1be520210f7c03f1b8515a9 (patch)
tree78f9cf681a8630565e45b835caf6c8350b1b194d /README.md
parentd2793bf454ff6ae8b1920b12a2a9f92c5328bc83 (diff)
downloadtinyobjloader-d4a7eefc5462392dc1be520210f7c03f1b8515a9.tar.gz
Fix typo in usage.
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 1bfcb90..b33c6a3 100644
--- a/README.md
+++ b/README.md
@@ -123,13 +123,13 @@ if (!ret) {
for (size_t s = 0; s < shapes.size(); s++) {
// Loop over faces(polygon)
size_t index_offset = 0;
- for (size_t f = 0; f < shapes[i].mesh.num_face_vertices.size(); f++) {
- int fv = shapes[i].mesh.num_face_vertices[f];
+ for (size_t f = 0; f < shapes[s].mesh.num_face_vertices.size(); f++) {
+ int fv = shapes[s].mesh.num_face_vertices[f];
// Loop over vertices in the face.
- for (size_t v = 0; v < fv; f++) {
+ for (size_t v = 0; v < fv; v++) {
// access to vertex
- tinyobj::index_t idx = shapes[i].mesh.indices[index_offset + v];
+ tinyobj::index_t idx = shapes[s].mesh.indices[index_offset + v];
float vx = attrib.vertices[3*idx.vertex_index+0];
float vy = attrib.vertices[3*idx.vertex_index+1];
float vz = attrib.vertices[3*idx.vertex_index+2];
@@ -142,7 +142,7 @@ for (size_t s = 0; s < shapes.size(); s++) {
index_offset += fv;
// per-face material
- shapes[i].mesh.material_ids[f];
+ shapes[s].mesh.material_ids[f];
}
}