Skip to content

Instantly share code, notes, and snippets.

@flexd
Created April 12, 2012 22:20
Show Gist options
  • Save flexd/2371423 to your computer and use it in GitHub Desktop.
Save flexd/2371423 to your computer and use it in GitHub Desktop.
glVertexAttribPointer (s->attribLocation("a_position"), 2, GL_FLOAT, GL_FALSE, sizeof(vertex2f), 0);
glEnableVertexAttribArray (s->attribLocation("a_position"));
glVertexAttribPointer (s->attribLocation("aTextureCoord"), 2, GL_FLOAT, GL_FALSE, sizeof(vertex2f), (void *) (2 * sizeof (float)));
glEnableVertexAttribArray (s->attribLocation("aTextureCoord"));
glVertexAttribPointer (s->attribLocation("aColor"), 4, GL_FLOAT, GL_FALSE, sizeof(vertex2f), (void *) (4 * sizeof (float)));
glEnableVertexAttribArray (s->attribLocation("aColor"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment