aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorF.H <friedrich@ratking.de>2018-09-06 21:11:00 +0200
committerGitHub <noreply@github.com>2018-09-06 21:11:00 +0200
commit9f1489dc1d84910a480b7044a3f70783c2e8fffa (patch)
tree7ac48b4a967f4b567f3cdd0ec7f856c137dd5dcb /src
parentdfb8837c466ea89ccdfa27b9c92700128d826353 (diff)
downloadraylib-9f1489dc1d84910a480b7044a3f70783c2e8fffa.tar.gz
raylib-9f1489dc1d84910a480b7044a3f70783c2e8fffa.zip
Update models.c
fix bug with GenMeshPlane() creating too many vertices/texcoords/normals for the plane mesh
Diffstat (limited to 'src')
-rw-r--r--src/models.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/models.c b/src/models.c
index 0d114555..bf52b30a 100644
--- a/src/models.c
+++ b/src/models.c
@@ -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++)