Ver código fonte

Fixed SpriteBatch using the wrong type for GL_ELEMENT_ARRAY_BUFFER.

rude 15 anos atrás
pai
commit
b94b5e6a9d
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      src/modules/graphics/opengl/SpriteBatch.cpp

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

@@ -81,7 +81,7 @@ namespace opengl
 		glBindBuffer(GL_ARRAY_BUFFER, 0);
 
 		glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vbo[1]);
-		glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLuint)*size*6, indices, GL_STATIC_DRAW);
+		glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLushort)*size*6, indices, GL_STATIC_DRAW);
 		glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
 
 		return true;