Mesa (gallium-map-range): demos/engine: respect display list mode when drawing pistons

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Mar 3 15:47:18 UTC 2009


Module: Mesa
Branch: gallium-map-range
Commit: 39a1a24b3fed6afa24a4db70ad4e3f128c24c815
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=39a1a24b3fed6afa24a4db70ad4e3f128c24c815

Author: Keith Whitwell <keithw at vmware.com>
Date:   Tue Mar  3 15:39:51 2009 +0000

demos/engine: respect display list mode when drawing pistons

---

 progs/demos/engine.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/progs/demos/engine.c b/progs/demos/engine.c
index 14fd1e6..af437e2 100644
--- a/progs/demos/engine.c
+++ b/progs/demos/engine.c
@@ -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();
 }
 




More information about the mesa-commit mailing list