Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GLfloat intertwined[] = /* both vertex and color arrays in one */
- {
- 1.0, 0.2, 1.0, 100.0, 100.0, 0.0,
- 1.0, 0.2, 0.2, 0.0, 200.0, 0.0,
- 1.0, 1.0, 0.2, 100.0, 300.0, 0.0,
- 0.2, 1.0, 0.2, 200.0, 300.0, 0.0,
- 0.2, 1.0, 1.0, 300.0, 200.0, 0.0,
- 0.2, 0.2, 1.0, 200.0, 100.0, 0.0
- };
- glColorPointer(3, GL_FLOAT, 6*sizeof(GLfloat), &intertwined[0]); /* refers to 1.0, 0.2, 0.2 */
- glVertexPointer(3, GL_FLOAT, 6*sizeof(GLfloat), &intertwined[3]); /* refers to 0.0, 200.0, 0.0 */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement