aboutsummaryrefslogtreecommitdiff
path: root/src/external/tinyobj_loader_c.h
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2019-04-01 00:15:45 +0200
committerRay <raysan5@gmail.com>2019-04-01 00:15:45 +0200
commit3e806ad9d4bc2131b2d8bf9c68e5e30a2b9b8e64 (patch)
treee999063daba216c868456961f8e6774825beeebf /src/external/tinyobj_loader_c.h
parent26fb2e0f3a5047dd77bfea82543a341aa25dda7a (diff)
downloadraylib-3e806ad9d4bc2131b2d8bf9c68e5e30a2b9b8e64.tar.gz
raylib-3e806ad9d4bc2131b2d8bf9c68e5e30a2b9b8e64.zip
Reviewed data assignation
Diffstat (limited to 'src/external/tinyobj_loader_c.h')
-rw-r--r--src/external/tinyobj_loader_c.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/external/tinyobj_loader_c.h b/src/external/tinyobj_loader_c.h
index e9d015ff..ae975829 100644
--- a/src/external/tinyobj_loader_c.h
+++ b/src/external/tinyobj_loader_c.h
@@ -1342,12 +1342,13 @@ int tinyobj_parse_obj(tinyobj_attrib_t *attrib, tinyobj_shape_t **shapes,
attrib->num_normals = (unsigned int)num_vn;
attrib->texcoords = (float *)TINYOBJ_MALLOC(sizeof(float) * num_vt * 2);
attrib->num_texcoords = (unsigned int)num_vt;
- attrib->faces = (tinyobj_vertex_index_t *)TINYOBJ_MALLOC(
- sizeof(tinyobj_vertex_index_t) * num_f);
- attrib->num_faces = (unsigned int)num_f;
+ attrib->faces = (tinyobj_vertex_index_t *)TINYOBJ_MALLOC(sizeof(tinyobj_vertex_index_t) * num_f);
attrib->face_num_verts = (int *)TINYOBJ_MALLOC(sizeof(int) * num_faces);
+
+ attrib->num_faces = (unsigned int)num_faces;
+ attrib->num_face_num_verts = (unsigned int)num_f;
+
attrib->material_ids = (int *)TINYOBJ_MALLOC(sizeof(int) * num_faces);
- attrib->num_face_num_verts = (unsigned int)num_faces;
for (i = 0; i < num_lines; i++) {
if (commands[i].type == COMMAND_EMPTY) {