chiark / gitweb /
Use better font rending for the X/Y/Z
authordaid303 <daid303@gmail.com>
Wed, 16 Jan 2013 10:24:17 +0000 (11:24 +0100)
committerdaid303 <daid303@gmail.com>
Wed, 16 Jan 2013 10:24:17 +0000 (11:24 +0100)
Cura/gui/util/opengl.py

index 9e009ca2784b2d09d0896820409a1a28955576ee..37a4c54e2f9e2d24de6b81fc13ecae3ade85baaf 100644 (file)
@@ -212,12 +212,8 @@ def DrawMachine(machineSize):
        glPushMatrix()
        glTranslate(23, 0, 0)
        noZ = ResetMatrixRotationAndScale()
-       glBegin(GL_LINES)
-       glVertex3f(-0.8, 1, 0)
-       glVertex3f(0.8, -1, 0)
-       glVertex3f(0.8, 1, 0)
-       glVertex3f(-0.8, -1, 0)
-       glEnd()
+       glRasterPos2f(-2,-2)
+       glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, ord('X'))
        glPopMatrix()
 
        #Y
@@ -225,12 +221,8 @@ def DrawMachine(machineSize):
        glPushMatrix()
        glTranslate(0, 23, 0)
        ResetMatrixRotationAndScale()
-       glBegin(GL_LINES)
-       glVertex3f(-0.8, 1, 0)
-       glVertex3f(0.0, 0, 0)
-       glVertex3f(0.8, 1, 0)
-       glVertex3f(-0.8, -1, 0)
-       glEnd()
+       glRasterPos2f(-2,-2)
+       glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, ord('Y'))
        glPopMatrix()
 
        #Z
@@ -239,16 +231,8 @@ def DrawMachine(machineSize):
                glPushMatrix()
                glTranslate(0, 0, 23)
                ResetMatrixRotationAndScale()
-               glBegin(GL_LINES)
-               glVertex3f(-0.8, 1, 0)
-               glVertex3f(0.8, 1, 0)
-               glVertex3f(0.8, 1, 0)
-               glVertex3f(-0.8, -1, 0)
-               glVertex3f(-0.8, -1, 0)
-               glVertex3f(0.8, -1, 0)
-               glEnd()
-               glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, 64)
-               glutStrokeCharacter(GLUT_STROKE_ROMAN, 64)
+               glRasterPos2f(-2,-2)
+               glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, ord('Z'))
                glPopMatrix()
 
        glPopMatrix()