mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-14 15:28:14 +00:00
Update models.c
fix bug with GenMeshPlane() creating too many vertices/texcoords/normals for the plane mesh
This commit is contained in:
@@ -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++)
|
||||
|
Reference in New Issue
Block a user