After generating a cube with triangle strips, odd deformities, in the form of planes, are created:
My triangle strip measurements come from this question: Cube using single GL_TRIANGLE_STRIP
Here is my drawCube
function:
def drawRec():
glColor3f(255, 0, 0)
cubePoints = [
-1.0, 1.0, 1.0, # Front-top-left
1.0, 1.0, 1.0, # Front-top-right
-1.0, -1.0, 1.0, # Front-bottom-left
1.0, -1.0, 1.0, # Front-bottom-right
1.0, -1.0, -1.0, # Back-bottom-right
1.0, 1.0, 1.0, # Front-top-right
1.0, 1.0, -1.0, # Back-top-right
-1.0, 1.0, 1.0, # Front-top-left
-1.0, 1.0, -1.0, # Back-top-left
-1.0, -1.0, 1.0, # Front-bottom-left
-1.0, -1.0, -1.0, # Back-bottom-left
1.0, -1.0, -1.0, # Back-bottom-right
-1.0, 1.0, -1.0, # Back-top-left
1.0, 1.0, -1.0 # Back-top-right
]
glEnableClientState(GL_VERTEX_ARRAY)
glVertexPointer(3, GL_FLOAT, 0, cubePoints)
glDrawArrays( GL_TRIANGLE_STRIP, 0, 52)
glDisableClientState(GL_VERTEX_ARRAY)
Is there any way I can remove these planes? What is going on here?