diff options
| author | Ray <[email protected]> | 2021-07-07 21:41:45 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-07-07 21:41:45 +0200 |
| commit | 3a74534c39b9ca8391176ea81357ca6a55762048 (patch) | |
| tree | 654bbe003914a6c283cc30c09d93d079a8a9de22 /src/models.c | |
| parent | 4d438ed68d5bcc87536365006bde2914fb728174 (diff) | |
| download | raylib-3a74534c39b9ca8391176ea81357ca6a55762048.tar.gz raylib-3a74534c39b9ca8391176ea81357ca6a55762048.zip | |
Added a note
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/models.c b/src/models.c index cbe1ed1c..532dd178 100644 --- a/src/models.c +++ b/src/models.c @@ -3251,7 +3251,7 @@ static Model LoadOBJ(const char *fileName) if (ret != TINYOBJ_SUCCESS) TRACELOG(LOG_WARNING, "MODEL: [%s] Failed to load OBJ data", fileName); else TRACELOG(LOG_INFO, "MODEL: [%s] OBJ data loaded successfully: %i meshes/%i materials", fileName, meshCount, materialCount); - model.meshCount = materialCount; + model.meshCount = materialCount; // TODO: REVIEW!!! // Init model materials array if (materialCount > 0) @@ -3269,7 +3269,7 @@ static Model LoadOBJ(const char *fileName) model.meshes = (Mesh *)RL_CALLOC(model.meshCount, sizeof(Mesh)); model.meshMaterial = (int *)RL_CALLOC(model.meshCount, sizeof(int)); - // count the faces for each material + // Count the faces for each material int *matFaces = RL_CALLOC(meshCount, sizeof(int)); for (unsigned int mi = 0; mi < meshCount; mi++) @@ -3283,16 +3283,16 @@ static Model LoadOBJ(const char *fileName) } //-------------------------------------- - // create the material meshes + // Create the material meshes - // running counts/indexes for each material mesh as we are + // Running counts/indexes for each material mesh as we are // building them at the same time int *vCount = RL_CALLOC(model.meshCount, sizeof(int)); int *vtCount = RL_CALLOC(model.meshCount, sizeof(int)); int *vnCount = RL_CALLOC(model.meshCount, sizeof(int)); int *faceCount = RL_CALLOC(model.meshCount, sizeof(int)); - // allocate space for each of the material meshes + // Allocate space for each of the material meshes for (int mi = 0; mi < model.meshCount; mi++) { model.meshes[mi].vertexCount = matFaces[mi]*3; @@ -3303,7 +3303,7 @@ static Model LoadOBJ(const char *fileName) model.meshMaterial[mi] = mi; } - // scan through the combined sub meshes and pick out each material mesh + // Scan through the combined sub meshes and pick out each material mesh for (unsigned int af = 0; af < attrib.num_faces; af++) { int mm = attrib.material_ids[af]; // mesh material for this face |
