Fix triangle calculation in grass example

This commit is contained in:
Nikita Lisitsa 2020-10-03 17:32:40 +03:00
parent 2771564b94
commit 5ce414c27f

View file

@ -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;
}
}
}