Last active
December 27, 2015 04:09
-
-
Save comoc/7265141 to your computer and use it in GitHub Desktop.
In OpenGL ES, the API specification of glDrawElements, type must be GL_UNSIGNED_BYTE or GL_UNSIGNED_SHORT.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As you can see in http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawElements.xml | |
void glDrawElements( GLenum mode, | |
GLsizei count, | |
GLenum type, | |
const GLvoid * indices); | |
type | |
Specifies the type of the values in indices. Must be GL_UNSIGNED_BYTE or GL_UNSIGNED_SHORT. | |
CAUTION | |
In the case of Android, we set indices value as ByteBuffer or ShortBuffer. | |
However, we MUST set the type either GL_UNSIGNED_BYTE or GL_UNSIGNED_SHORT. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment