From 5ce414c27f7fac5b09199e4a50523025d0e8a898 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Sat, 3 Oct 2020 17:32:40 +0300 Subject: [PATCH] Fix triangle calculation in grass example --- examples/grass.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/grass.cpp b/examples/grass.cpp index 6e1596c4..09788181 100644 --- a/examples/grass.cpp +++ b/examples/grass.cpp @@ -440,9 +440,8 @@ struct grass_app grass_program["u_height10"] = h10; grass_program["u_height11"] = h11; grass_mesh.draw(0, ((i + 1) * grass_mesh.index_count()) / N); -// grass_mesh.draw(); - triangles += grass_mesh.index_count() / 3; + triangles += (((i + 1) * grass_mesh.index_count()) / N) / 3; } } }