浏览代码

Fix: Returning wrong type in VertexIndex::getType()

vrld 13 年之前
父节点
当前提交
b0abcbda71
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/modules/graphics/opengl/VertexBuffer.cpp

+ 1 - 1
src/modules/graphics/opengl/VertexBuffer.cpp

@@ -276,7 +276,7 @@ size_t VertexIndex::getIndexCount(size_t elements) const
 GLenum VertexIndex::getType(size_t s) const
 GLenum VertexIndex::getType(size_t s) const
 {
 {
 	// Calculates if unsigned short is big enough to hold all the vertex indices.
 	// Calculates if unsigned short is big enough to hold all the vertex indices.
-	static const GLenum type_table[] = {GL_UNSIGNED_INT, GL_UNSIGNED_SHORT};
+	static const GLenum type_table[] = {GL_UNSIGNED_SHORT, GL_UNSIGNED_INT};
 	return type_table[int(GLushort(-1) < s * 4)];
 	return type_table[int(GLushort(-1) < s * 4)];
 }
 }