mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-03 12:49:17 -05:00
[models] file open error check
This commit is contained in:
@ -1291,6 +1291,12 @@ static VertexData LoadOBJ(const char *fileName)
|
|||||||
|
|
||||||
objFile = fopen(fileName, "rt");
|
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
|
// First reading pass: Get numVertex, numNormals, numTexCoords, numTriangles
|
||||||
// NOTE: vertex, texcoords and normals could be optimized (to be used indexed on faces definition)
|
// NOTE: vertex, texcoords and normals could be optimized (to be used indexed on faces definition)
|
||||||
// NOTE: faces MUST be defined as TRIANGLES, not QUADS
|
// NOTE: faces MUST be defined as TRIANGLES, not QUADS
|
||||||
|
|||||||
Reference in New Issue
Block a user