- glEnableVertexAttribArray(ATTRIB_VERTEX);
- glBindBuffer(GL_ARRAY_BUFFER, handle[ATTRIB_VERTEX]);
- glVertexAttribPointer(
- ATTRIB_VERTEX, // location (for shader)
- 3, // size
- GL_FLOAT, // type
- GL_FALSE, // normalized
- 0, // stride
- nullptr // offset
- );
-
- glEnableVertexAttribArray(ATTRIB_COLOR);
- glBindBuffer(GL_ARRAY_BUFFER, handle[ATTRIB_COLOR]);
- glVertexAttribPointer(
- ATTRIB_COLOR, // location (for shader)
- 3, // size
- GL_FLOAT, // type
- GL_FALSE, // normalized
- 0, // stride
- nullptr // offset
- );
-