浏览代码

Fix rendering to only use glDrawElementsInstanced when necessary

--HG--
branch : minor
Alex Szpakowski 8 年之前
父节点
当前提交
98493d9844
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/modules/graphics/opengl/OpenGL.cpp

+ 1 - 1
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);