Created
August 16, 2012 20:37
-
-
Save chunkyguy/3373423 to your computer and use it in GitHub Desktop.
Apple OpenGL template for iOS uses two sets of enums
This file contains 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
/* | |
At create setup stage | |
*/ | |
glEnableVertexAttribArray(GLKVertexAttribPosition); | |
glVertexAttribPointer(GLKVertexAttribPosition, 3, GL_FLOAT, GL_FALSE, 24, BUFFER_OFFSET(0)); | |
glEnableVertexAttribArray(GLKVertexAttribNormal); | |
glVertexAttribPointer(GLKVertexAttribNormal, 3, GL_FLOAT, GL_FALSE, 24, BUFFER_OFFSET(12)); | |
/* | |
At binding stage | |
*/ | |
glBindAttribLocation(_program, ATTRIB_VERTEX, "position"); | |
glBindAttribLocation(_program, ATTRIB_NORMAL, "normal"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment