Created
September 8, 2011 01:48
-
-
Save dennda/1202405 to your computer and use it in GitHub Desktop.
This file contains 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
// Vertices drawn as GL_TRIANGLE_STRIP: | |
GLfloat d = 0.5f; | |
// We have 4 verts * 3 coords = 12 elements per slice | |
const GLfloat one_slice[12] = { | |
// x, y, z | |
-d, d, 0., | |
d, d, 0., | |
-d, -d, 0., | |
d, -d, 0., | |
}; | |
// modelview projection: | |
float dim = 2.f; | |
GLKMatrix4 projectionMatrix = GLKMatrix4MakeOrtho(-dim, dim, | |
-dim, dim, | |
-dim, dim); | |
float axdist = 1.f; | |
GLKMatrix4 modelViewMatrix = GLKMatrix4MakeLookAt(axdist, axdist, axdist, | |
0., 0., 0., | |
0., 1., 0.); | |
_modelViewProjectionMatrix = GLKMatrix4Multiply(projectionMatrix, modelViewMatrix); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment