Skip to content

Commit 6c10cd9

Browse files
RenderVboIbo: fix number of vertex indices
The amount of indices to use from the element buffer is number-of-elements times the number-of-indices.
1 parent 2b56e6a commit 6c10cd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pangolin/gl/glvbo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ inline void RenderVboIbo(GlBuffer& vbo, GlBuffer& ibo, bool draw_mesh)
127127

128128
if(draw_mesh) {
129129
ibo.Bind();
130-
glDrawElements(GL_TRIANGLE_STRIP,ibo.num_elements, ibo.datatype, 0);
130+
glDrawElements(GL_TRIANGLE_STRIP, ibo.num_elements*ibo.count_per_element, ibo.datatype, 0);
131131
ibo.Unbind();
132132
}else{
133133
glDrawArrays(GL_POINTS, 0, vbo.num_elements);

0 commit comments

Comments
 (0)