I'm trying to program a rotaing cube. Therefore I generate a cube using my make_cube
method. Unfortunatly some faces of the cube don't get rendered. I tried a lot I don't understand why the cube is not "extruded" fully. Here is my code for generating the cube:
def make_cube(self):
glColor3f(0, 1, 0)
#front
GL.glVertex3d(0.0, 0.0, 0.0)
GL.glVertex3d(0.2, 0.0, 0.0)
GL.glVertex3d(0.2, 0.2, 0.0)
GL.glVertex3d(0.0, 0.2, 0.0)
# back
GL.glVertex3d(0.0, 0.0, -0.2)
GL.glVertex3d(0.2, 0.0, -0.2)
GL.glVertex3d(0.2, 0.2, -0.2)
GL.glVertex3d(0.0, 0.2, -0.2)
# right
GL.glVertex3d(0.2, 0.0, 0.0)
GL.glVertex3d(0.2, 0.0, -0.2)
GL.glVertex3d(0.2, 0.2, -0.2)
GL.glVertex3d(0.2, 0.2, 0.0)
# left
GL.glVertex3d(0.0, 0.0, 0.0)
GL.glVertex3d(0.0, 0.0, -0.2)
GL.glVertex3d(0.0, 0.2, -0.2)
GL.glVertex3d(0.0, 0.2, 0.0)
# top
GL.glVertex3d(0.0, 0.2, 0.0)
GL.glVertex3d(0.2, 0.2, 0.0)
GL.glVertex3d(0.2, 0.2, -0.2)
GL.glVertex3d(0.0, 0.2, -0.2)
# bottom
GL.glVertex3d(0.0, 0.0, 0.0)
GL.glVertex3d(0.2, 0.0, 0.0)
GL.glVertex3d(0.2, 0.0, -0.2)
GL.glVertex3d(0.0, 0.0, -0.2)