mirror of
https://github.com/thisistherk/fast_obj.git
synced 2025-04-06 14:05:02 +00:00
Fix stupid face counting bug in objects
This commit is contained in:
parent
9f4b38eb1b
commit
ed03b86e7f
1 changed files with 3 additions and 2 deletions
|
@ -506,7 +506,7 @@ void flush_object(fastObjData* data)
|
|||
|
||||
/* Reset for more data */
|
||||
data->object = object_default();
|
||||
data->object.face_offset = array_size(data->mesh->face_vertices);
|
||||
data->object.face_offset = array_size(data->mesh->face_vertices);
|
||||
data->object.index_offset = array_size(data->mesh->indices);
|
||||
}
|
||||
|
||||
|
@ -544,7 +544,7 @@ void flush_group(fastObjData* data)
|
|||
|
||||
/* Reset for more data */
|
||||
data->group = group_default();
|
||||
data->group.face_offset = array_size(data->mesh->face_vertices);
|
||||
data->group.face_offset = array_size(data->mesh->face_vertices);
|
||||
data->group.index_offset = array_size(data->mesh->indices);
|
||||
}
|
||||
|
||||
|
@ -772,6 +772,7 @@ const char* parse_face(fastObjData* data, const char* ptr)
|
|||
array_push(data->mesh->face_materials, data->material);
|
||||
|
||||
data->group.face_count++;
|
||||
data->object.face_count++;
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue