+ # draw six faces of a cube
+ glcanvas.glBegin(glcanvas.GL_QUADS)
+ glcanvas.glNormal3f( 0.0, 0.0, 1.0)
+ glcanvas.glVertex3f( 0.5, 0.5, 0.5)
+ glcanvas.glVertex3f(-0.5, 0.5, 0.5)
+ glcanvas.glVertex3f(-0.5,-0.5, 0.5)
+ glcanvas.glVertex3f( 0.5,-0.5, 0.5)
+
+ glcanvas.glNormal3f( 0.0, 0.0,-1.0)
+ glcanvas.glVertex3f(-0.5,-0.5,-0.5)
+ glcanvas.glVertex3f(-0.5, 0.5,-0.5)
+ glcanvas.glVertex3f( 0.5, 0.5,-0.5)
+ glcanvas.glVertex3f( 0.5,-0.5,-0.5)
+
+ glcanvas.glNormal3f( 0.0, 1.0, 0.0)
+ glcanvas.glVertex3f( 0.5, 0.5, 0.5)
+ glcanvas.glVertex3f( 0.5, 0.5,-0.5)
+ glcanvas.glVertex3f(-0.5, 0.5,-0.5)
+ glcanvas.glVertex3f(-0.5, 0.5, 0.5)
+
+ glcanvas.glNormal3f( 0.0,-1.0, 0.0)
+ glcanvas.glVertex3f(-0.5,-0.5,-0.5)
+ glcanvas.glVertex3f( 0.5,-0.5,-0.5)
+ glcanvas.glVertex3f( 0.5,-0.5, 0.5)
+ glcanvas.glVertex3f(-0.5,-0.5, 0.5)
+
+ glcanvas.glNormal3f( 1.0, 0.0, 0.0)
+ glcanvas.glVertex3f( 0.5, 0.5, 0.5)
+ glcanvas.glVertex3f( 0.5,-0.5, 0.5)
+ glcanvas.glVertex3f( 0.5,-0.5,-0.5)
+ glcanvas.glVertex3f( 0.5, 0.5,-0.5)
+
+ glcanvas.glNormal3f(-1.0, 0.0, 0.0)
+ glcanvas.glVertex3f(-0.5,-0.5,-0.5)
+ glcanvas.glVertex3f(-0.5,-0.5, 0.5)
+ glcanvas.glVertex3f(-0.5, 0.5, 0.5)
+ glcanvas.glVertex3f(-0.5, 0.5,-0.5)
+ glcanvas.glEnd()
+
+ glcanvas.glRotatef((self.lasty - self.y)/100., 1.0, 0.0, 0.0);
+ glcanvas.glRotatef((self.lastx - self.x)/100., 0.0, 1.0, 0.0);