Removed trailing spaces
This commit is contained in:
parent
963de06d08
commit
d4382f4a52
7 changed files with 106 additions and 106 deletions
|
@ -1692,7 +1692,7 @@ bool ExportMesh(Mesh mesh, const char *fileName)
|
|||
{
|
||||
for (int i = 0, v = 0; i < mesh.triangleCount; i++, v += 3)
|
||||
{
|
||||
byteCount += sprintf(txtData + byteCount, "f %i/%i/%i %i/%i/%i %i/%i/%i\n",
|
||||
byteCount += sprintf(txtData + byteCount, "f %i/%i/%i %i/%i/%i %i/%i/%i\n",
|
||||
mesh.indices[v] + 1, mesh.indices[v] + 1, mesh.indices[v] + 1,
|
||||
mesh.indices[v + 1] + 1, mesh.indices[v + 1] + 1, mesh.indices[v + 1] + 1,
|
||||
mesh.indices[v + 2] + 1, mesh.indices[v + 2] + 1, mesh.indices[v + 2] + 1);
|
||||
|
@ -4543,7 +4543,7 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat
|
|||
|
||||
cgltf_options options = { 0 };
|
||||
cgltf_result result = cgltf_load_buffer_base64(&options, outSize, cgltfImage->uri + i + 1, &data);
|
||||
|
||||
|
||||
if (result == cgltf_result_success)
|
||||
{
|
||||
image = LoadImageFromMemory(".png", (unsigned char *)data, outSize);
|
||||
|
@ -4571,12 +4571,12 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat
|
|||
|
||||
// Check mime_type for image: (cgltfImage->mime_type == "image/png")
|
||||
// NOTE: Detected that some models define mime_type as "image\\/png"
|
||||
if ((strcmp(cgltfImage->mime_type, "image\\/png") == 0) ||
|
||||
if ((strcmp(cgltfImage->mime_type, "image\\/png") == 0) ||
|
||||
(strcmp(cgltfImage->mime_type, "image/png") == 0)) image = LoadImageFromMemory(".png", data, (int)cgltfImage->buffer_view->size);
|
||||
else if ((strcmp(cgltfImage->mime_type, "image\\/jpeg") == 0) ||
|
||||
(strcmp(cgltfImage->mime_type, "image/jpeg") == 0)) image = LoadImageFromMemory(".jpg", data, (int)cgltfImage->buffer_view->size);
|
||||
else TRACELOG(LOG_WARNING, "MODEL: glTF image data MIME type not recognized", TextFormat("%s/%s", texPath, cgltfImage->uri));
|
||||
|
||||
|
||||
RL_FREE(data);
|
||||
}
|
||||
|
||||
|
@ -4637,7 +4637,7 @@ static Model LoadGLTF(const char *fileName)
|
|||
cgltf_options options = { 0 };
|
||||
cgltf_data *data = NULL;
|
||||
cgltf_result result = cgltf_parse(&options, fileData, dataSize, &data);
|
||||
|
||||
|
||||
if (result == cgltf_result_success)
|
||||
{
|
||||
if (data->file_type == cgltf_file_type_glb) TRACELOG(LOG_INFO, "MODEL: [%s] Model basic data (glb) loaded successfully", fileName);
|
||||
|
@ -4665,7 +4665,7 @@ static Model LoadGLTF(const char *fileName)
|
|||
for (int i = 0; i < model.meshCount; i++) model.meshes[i].vboId = (unsigned int*)RL_CALLOC(MAX_MESH_VERTEX_BUFFERS, sizeof(unsigned int));
|
||||
|
||||
// NOTE: We keep an extra slot for default material, in case some mesh requires it
|
||||
model.materialCount = (int)data->materials_count + 1;
|
||||
model.materialCount = (int)data->materials_count + 1;
|
||||
model.materials = RL_CALLOC(model.materialCount, sizeof(Material));
|
||||
model.materials[0] = LoadMaterialDefault(); // Load default material (index: 0)
|
||||
|
||||
|
@ -4708,8 +4708,8 @@ static Model LoadGLTF(const char *fileName)
|
|||
model.materials[j].maps[MATERIAL_MAP_ROUGHNESS].texture = LoadTextureFromImage(imMetallicRoughness);
|
||||
UnloadImage(imMetallicRoughness);
|
||||
}
|
||||
|
||||
// Load metallic/roughness material properties
|
||||
|
||||
// Load metallic/roughness material properties
|
||||
float roughness = data->materials[i].pbr_metallic_roughness.roughness_factor;
|
||||
model.materials[j].maps[MATERIAL_MAP_ROUGHNESS].value = roughness;
|
||||
|
||||
|
@ -4757,7 +4757,7 @@ static Model LoadGLTF(const char *fileName)
|
|||
}
|
||||
}
|
||||
|
||||
// Other possible materials not supported by raylib pipeline:
|
||||
// Other possible materials not supported by raylib pipeline:
|
||||
// has_clearcoat, has_transmission, has_volume, has_ior, has specular, has_sheen
|
||||
}
|
||||
|
||||
|
@ -4787,7 +4787,7 @@ static Model LoadGLTF(const char *fileName)
|
|||
|
||||
if ((attribute->component_type == cgltf_component_type_r_32f) && (attribute->type == cgltf_type_vec3))
|
||||
{
|
||||
// Init raylib mesh vertices to copy glTF attribute data
|
||||
// Init raylib mesh vertices to copy glTF attribute data
|
||||
model.meshes[meshIndex].vertexCount = (int)attribute->count;
|
||||
model.meshes[meshIndex].vertices = RL_MALLOC(attribute->count*3*sizeof(float));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue