Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GLfloat vdata[] =
- {
- -X, 0.0, Z,
- X, 0.0, Z,
- -X, 0.0, -Z,
- 0.0, Z, X,
- 0.0, Z, -X,
- 0.0, -Z, X,
- 0.0, -Z, -X,
- Z, X, 0.0,
- -Z, X, 0.0,
- Z, -X, 0.0,
- -Z, -X, 0.0
- };
- GLuint tindicies[] =
- {
- 1,4,0,
- 4,9,0,
- 4,5,9,
- 8,5,4,
- 1,8,4,
- 1,10,8,
- 10,3,8,
- 8,3,5,
- 3,2,5,
- 3,7,2,
- 3,10,7,
- 10,6,7,
- 6,11,7,
- 6,0,11,
- 6,1,0,
- 10,1,6,
- 11,0,9,
- 2,11,9,
- 5,2,9,
- 11,2,7
- };
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, vdata);
- glClear(GL_COLOR_BUFFER_BIT); /* clear */
- {
- glDrawElements(GL_TRIANGLES, 36, GL_FLOAT, tindicies);
- }
- glFlush();
- glutSwapBuffers(); /* For double-buffering */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement