summaryrefslogtreecommitdiff
path: root/Extras
diff options
context:
space:
mode:
authorChuyuan Fu <fuchuyuan.kelly@gmail.com>2020-01-30 19:25:04 -0800
committerChuyuan Fu <fuchuyuan.kelly@gmail.com>2020-01-30 19:25:04 -0800
commite76ebe86d9aedc0919d9dfacc4ce9cab876b55b9 (patch)
tree18ed9aa7b5d92be59b2f45842f73db80e55a4ace /Extras
parent7380a55ba7c97933ed3db1ed461bb06530eef82e (diff)
downloadbullet3-e76ebe86d9aedc0919d9dfacc4ce9cab876b55b9.tar.gz
fix index for obj2sdf
Diffstat (limited to 'Extras')
-rw-r--r--Extras/obj2sdf/obj2sdf.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Extras/obj2sdf/obj2sdf.cpp b/Extras/obj2sdf/obj2sdf.cpp
index 8d3db3955..720bcf18e 100644
--- a/Extras/obj2sdf/obj2sdf.cpp
+++ b/Extras/obj2sdf/obj2sdf.cpp
@@ -376,11 +376,11 @@ int main(int argc, char* argv[])
continue;
}
fprintf(f, "f %d/%d/%d %d/%d/%d %d/%d/%d\n",
- shape.mesh.indices[face].vertex_index + 1, shape.mesh.indices[face].vertex_index + 1, shape.mesh.indices[face].vertex_index + 1,
- shape.mesh.indices[face + 1].vertex_index + 1, shape.mesh.indices[face + 1].vertex_index + 1, shape.mesh.indices[face + 1].vertex_index + 1,
- shape.mesh.indices[face + 2].vertex_index + 1, shape.mesh.indices[face + 2].vertex_index + 1, shape.mesh.indices[face + 2].vertex_index + 1);
+ shape.mesh.indices[face].vertex_index + 1, shape.mesh.indices[face].texcoord_index + 1, shape.mesh.indices[face].normal_index + 1,
+ shape.mesh.indices[face + 1].vertex_index + 1, shape.mesh.indices[face + 1].texcoord_index + 1, shape.mesh.indices[face + 1].normal_index + 1,
+ shape.mesh.indices[face + 2].vertex_index + 1, shape.mesh.indices[face + 2].texcoord_index + 1, shape.mesh.indices[face + 2].normal_index + 1);
}
- fclose(f);
+ fclose(f);
float kdRed = mat.diffuse[0];
float kdGreen = mat.diffuse[1];