From 98493d9844f74be98147c27c7555fd79fc6bc1f6 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 29 Jan 2017 16:13:41 -0400 Subject: [PATCH] Fix rendering to only use glDrawElementsInstanced when necessary --HG-- branch : minor --- src/modules/graphics/opengl/OpenGL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 2ad700a05..3bd47406d 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -468,7 +468,7 @@ void OpenGL::drawArrays(GLenum mode, GLint first, GLsizei count, GLsizei instanc void OpenGL::drawElements(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount) { - if (count > 1) + if (instancecount > 1) glDrawElementsInstanced(mode, count, type, indices, instancecount); else glDrawElements(mode, count, type, indices);