From a41eb8b969491a4c0afac66443e3f20910bedd57 Mon Sep 17 00:00:00 2001 From: _ <> Date: Mon, 17 Feb 2020 02:03:53 +0000 Subject: [PATCH] Switch to glDrawRangeElements --- src/glezz.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glezz.rs b/src/glezz.rs index af04d0a..c07e2ab 100644 --- a/src/glezz.rs +++ b/src/glezz.rs @@ -273,7 +273,7 @@ impl RenderableModel { vertex_attrib_pointer (attrs ["uv"], 2, self.num_pos); vertex_attrib_pointer (attrs ["normal"], 3, self.num_pos + self.num_uv); - gl::DrawElements (gl::TRIANGLES, mesh.num_triangles * 3, gl::UNSIGNED_INT, (mesh.first_triangle * 3 * 4) as *const u8 as *const c_void); + gl::DrawRangeElements (gl::TRIANGLES, 0, self.indexes.max, mesh.num_triangles * 3, gl::UNSIGNED_INT, (mesh.first_triangle * 3 * 4) as *const u8 as *const c_void); } } }