Commits

Cliff Biffle committed bdb1afa

Factored axis drawing out of depth field routine.

Comments (0)

Files changed (1)

   return (-325.616 / (((GLfloat) reading) + -1084.61));
 }
 
-- (void) drawDepthField {
+static void axes() {
   glBegin(GL_LINES);
   glColor3f(1, 1, 1);
   glVertex3f(320, 240, 0);
   glVertex3f(320, 240, 0);
   glVertex3f(320, 240, 1);
   glEnd();
+}
+
+- (void) drawDepthField {
+  axes();
   
   const uint16_t *depths = [rawDepthField bytes];
   
       GLfloat py = (y - 240) * dr + 240;
       
       GLfloat c = 1 - (d1/6.);
-      glColor3f(c,c,c);
+      glColor3f(c, c, c);
       glVertex3f(px, py, d1);
     }
   }