mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-29 18:29:18 -05:00
Fix GenMeshPlane when resX != resZ (#3425)
Co-authored-by: Stanislav Yablonskiy <s.yablonskiy@pixonic.com>
This commit is contained in:
@ -2249,7 +2249,7 @@ Mesh GenMeshPlane(float width, float length, int resX, int resZ)
|
|||||||
for (int face = 0; face < numFaces; face++)
|
for (int face = 0; face < numFaces; face++)
|
||||||
{
|
{
|
||||||
// Retrieve lower left corner from face ind
|
// Retrieve lower left corner from face ind
|
||||||
int i = face % (resX - 1) + (face/(resZ - 1)*resX);
|
int i = face + face / (resX - 1);
|
||||||
|
|
||||||
triangles[t++] = i + resX;
|
triangles[t++] = i + resX;
|
||||||
triangles[t++] = i + 1;
|
triangles[t++] = i + 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user