home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenGL Superbible
/
OpenGL_Superbible_Waite_Group_Press_1996.iso
/
book
/
chapt10
/
tank
/
tank.txt
Wrap
Text File
|
1996-07-07
|
1KB
|
26 lines
TANK - CHAPTER 10
In chapter 10, we saw how using display lists can speed up rendering, and
can be used to organize our scene. For this chapter, I modified the compass
window to make use of a single display list, and the view window to make use
of a display list that does most of the static rendering, with two notable
exceptions.
First, I could not build the robot or tank with a display list. These
functions contain glRotatef() that uses the tank and robots orientation. Since
these varaibles are constantly changing, it would do no good to include them
in the display list. I could have broken out the precise drawing code after
the glRotate and made a display list of that but since the robot and tank are
so simple (only a few polygons), the performance benefit would be very minor.
The second exception is the drawing of the Pillars. There seems to be some
bug associated with drawing an auxSolidBox within a display list. To avoid it
I just didn't put the Pillers inside a display list. Depending on your
hardware, this version "feels" a bit faster than the last one (the one in
chapter 9 without display lists).
Richard