- glBegin(GL_QUADS)
- glNormal3f( 0.0, 0.0, 1.0)
- glVertex3f( 0.5, 0.5, 0.5)
- glVertex3f(-0.5, 0.5, 0.5)
- glVertex3f(-0.5,-0.5, 0.5)
- glVertex3f( 0.5,-0.5, 0.5)
-
- glNormal3f( 0.0, 0.0,-1.0)
- glVertex3f(-0.5,-0.5,-0.5)
- glVertex3f(-0.5, 0.5,-0.5)
- glVertex3f( 0.5, 0.5,-0.5)
- glVertex3f( 0.5,-0.5,-0.5)
-
- glNormal3f( 0.0, 1.0, 0.0)
- glVertex3f( 0.5, 0.5, 0.5)
- glVertex3f( 0.5, 0.5,-0.5)
- glVertex3f(-0.5, 0.5,-0.5)
- glVertex3f(-0.5, 0.5, 0.5)
-
- glNormal3f( 0.0,-1.0, 0.0)
- glVertex3f(-0.5,-0.5,-0.5)
- glVertex3f( 0.5,-0.5,-0.5)
- glVertex3f( 0.5,-0.5, 0.5)
- glVertex3f(-0.5,-0.5, 0.5)
-
- glNormal3f( 1.0, 0.0, 0.0)
- glVertex3f( 0.5, 0.5, 0.5)
- glVertex3f( 0.5,-0.5, 0.5)
- glVertex3f( 0.5,-0.5,-0.5)
- glVertex3f( 0.5, 0.5,-0.5)
-
- glNormal3f(-1.0, 0.0, 0.0)
- glVertex3f(-0.5,-0.5,-0.5)
- glVertex3f(-0.5,-0.5, 0.5)
- glVertex3f(-0.5, 0.5, 0.5)
- glVertex3f(-0.5, 0.5,-0.5)
- glEnd()
-
- glRotatef((self.lasty - self.y)/100., 1.0, 0.0, 0.0);
- glRotatef((self.lastx - self.x)/100., 0.0, 1.0, 0.0);
+ 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);