Переглянути джерело

[models] file open error check

pull/12/head
raysan5 10 роки тому
джерело
коміт
db1ad74ef2
1 змінених файлів з 6 додано та 0 видалено
  1. +6
    -0
      src/models.c

+ 6
- 0
src/models.c Переглянути файл

@ -1290,6 +1290,12 @@ static VertexData LoadOBJ(const char *fileName)
FILE *objFile;
objFile = fopen(fileName, "rt");
if (objFile == NULL)
{
TraceLog(WARNING, "[%s] OBJ file could not be opened", fileName);
return vData;
}
// First reading pass: Get numVertex, numNormals, numTexCoords, numTriangles
// NOTE: vertex, texcoords and normals could be optimized (to be used indexed on faces definition)

Завантаження…
Відмінити
Зберегти