From 584650d2bb2312c10bf0bbb818eb6adf3e245381 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Thu, 6 Oct 2016 19:29:27 +0100 Subject: [PATCH] RenderVboIbo: use GL_TRIANGLES instead of GL_TRIANGLE_STRIP By using GL_TRIANGLES, the index order does not need to be pre-processed. --- include/pangolin/gl/glvbo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pangolin/gl/glvbo.h b/include/pangolin/gl/glvbo.h index cc88d4629..e4d84cd4d 100644 --- a/include/pangolin/gl/glvbo.h +++ b/include/pangolin/gl/glvbo.h @@ -131,7 +131,7 @@ inline void RenderVboIbo(GlBuffer& vbo, GlBuffer& ibo, bool draw_mesh) if(draw_mesh) { ibo.Bind(); - glDrawElements(GL_TRIANGLE_STRIP, ibo.num_elements*ibo.count_per_element, ibo.datatype, 0); + glDrawElements(GL_TRIANGLES, ibo.num_elements*ibo.count_per_element, ibo.datatype, 0); ibo.Unbind(); }else{ glDrawArrays(GL_POINTS, 0, vbo.num_elements);