Created
March 2, 2011 16:02
-
-
Save sixman9/851154 to your computer and use it in GitHub Desktop.
How to draw a cube using 13 Triangle Strip vertices.
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
How to draw a Cube with OpenGL's Triangle strip (non-Vertex buffer object example, 13 vertices) | |
gl.glBegin(gl.GL_TRIANGLESTRIP); | |
gl.glVertex(100,100,−100); | |
gl.glVertex(100,300,−100); | |
gl.glVertex(300,300,−100); | |
gl.glVertex(300,300,−300); | |
gl.glVertex(300,100,−300); | |
gl.glVertex(100,100,−100); | |
gl.glVertex(100,100,−300); | |
gl.glVertex(100,300,−300); | |
gl.glVertex(100,300,−100); | |
gl.glVertex(100,300,−100); | |
gl.glVertex(100,300,−300); | |
gl.glVertex(100,100,−300); | |
gl.glVertex(300,100,−300); | |
gl.glEnd(); |
It does'nt work at all
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you kidding me