Last active
December 20, 2015 03:59
-
-
Save jblocksom/6067198 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
GLfloat vertices[] = { | |
// left side | |
-1.0, -1.0, -1.0, | |
-1.0, -1.0, 1.0, | |
-1.0, 1.0, -1.0, | |
-1.0, -1.0, 1.0, | |
-1.0, 1.0, -1.0, | |
-1.0, 1.0, 1.0, | |
// right side | |
1.0, -1.0, -1.0, | |
1.0, -1.0, 1.0, | |
1.0, 1.0, -1.0, | |
1.0, -1.0, 1.0, | |
1.0, 1.0, -1.0, | |
1.0, 1.0, 1.0, | |
// Bottom | |
-1.0, 1.0, -1.0, | |
-1.0, 1.0, 1.0, | |
1.0, 1.0, -1.0, | |
-1.0, 1.0, 1.0, | |
1.0, 1.0, -1.0, | |
1.0, 1.0, 1.0, | |
// Top | |
-1.0, -1.0, -1.0, | |
-1.0, -1.0, 1.0, | |
1.0, -1.0, -1.0, | |
-1.0, -1.0, 1.0, | |
1.0, -1.0, -1.0, | |
1.0, -1.0, 1.0, | |
}; |
This file contains hidden or 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
GLfloat vertices[] = { | |
// left side | |
-1.0, -1.0, -1.0, 1.0, 0.0, | |
-1.0, -1.0, 1.0, 0.0, 0.0, | |
-1.0, 1.0, -1.0, 1.0, 1.0, | |
-1.0, -1.0, 1.0, 0.0, 0.0, | |
-1.0, 1.0, -1.0, 1.0, 1.0, | |
-1.0, 1.0, 1.0, 0.0, 1.0, | |
// right side | |
1.0, -1.0, -1.0, 0.0, 0.0, | |
1.0, -1.0, 1.0, 0.0, 1.0, | |
1.0, 1.0, -1.0, 1.0, 0.0, | |
1.0, -1.0, 1.0, 0.0, 1.0, | |
1.0, 1.0, -1.0, 1.0, 0.0, | |
1.0, 1.0, 1.0, 1.0, 1.0, | |
// Bottom | |
-1.0, 1.0, -1.0, 0.0, 0.0, | |
-1.0, 1.0, 1.0, 0.0, 1.0, | |
1.0, 1.0, -1.0, 1.0, 0.0, | |
-1.0, 1.0, 1.0, 0.0, 1.0, | |
1.0, 1.0, -1.0, 1.0, 0.0, | |
1.0, 1.0, 1.0, 1.0, 1.0, | |
// Top | |
-1.0, -1.0, -1.0, 0.0, 0.0, | |
-1.0, -1.0, 1.0, 0.0, 1.0, | |
1.0, -1.0, -1.0, 1.0, 0.0, | |
-1.0, -1.0, 1.0, 0.0, 1.0, | |
1.0, -1.0, -1.0, 1.0, 0.0, | |
1.0, -1.0, 1.0, 1.0, 1.0, | |
}; | |
const int COORDS_PER_VERTEX = 5; | |
const int numVertices = sizeof(vertices) / (sizeof(GLfloat) * COORDS_PER_VERTEX); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment