OSDN Git Service

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 14fd1e6..af437e2 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();
 }