Update models.c

fix bug with GenMeshPlane() creating too many vertices/texcoords/normals for the plane mesh
This commit is contained in:
F.H 2018-09-06 21:11:00 +02:00 committed by GitHub
parent dfb8837c46
commit 9f1489dc1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -717,7 +717,7 @@ Mesh GenMeshPlane(float width, float length, int resX, int resZ)
resZ++;
// Vertices definition
int vertexCount = resX*resZ*6; // 6 vertex by quad
int vertexCount = resX*resZ; // vertices get reused for the faces
Vector3 *vertices = (Vector3 *)malloc(vertexCount*sizeof(Vector3));
for (int z = 0; z < resZ; z++)