demos/engine: respect display list mode when drawing pistons
authorKeith Whitwell <keithw@vmware.com>
Tue, 3 Mar 2009 15:39:51 +0000 (15:39 +0000)
committerKeith Whitwell <keithw@vmware.com>
Tue, 3 Mar 2009 15:40:14 +0000 (15:40 +0000)
progs/demos/engine.c

index 14fd1e68629b15e2877e6d11adaf3f23c8f8c434..af437e2f1418a9f93bec6e5ffcea981a5a5228f5 100644 (file)
@@ -386,7 +386,10 @@ DrawPositionedPiston(const Engine *eng, float crankAngle)
    glPushMatrix();
       glRotatef(-90, 1, 0, 0);
       glTranslatef(0, 0, pos);
-      DrawPiston(eng);
+      if (eng->PistonList)
+         glCallList(eng->PistonList);
+      else
+         DrawPiston(eng);
    glPopMatrix();
 }