From 2b55ce0318f0852bcdc46cd90e1f712763648a29 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 ab53d1280..fe310fe29 100644 --- a/include/pangolin/gl/glvbo.h +++ b/include/pangolin/gl/glvbo.h @@ -132,7 +132,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);