Page 384 OpenGL Super Bible! glCallList(SHAFT_LIST); glCallList(THREAD_LIST); // (Web server)
Page 384 OpenGL Super Bible! glCallList(SHAFT_LIST); glCallList(THREAD_LIST); // Translate back again for next pass glTranslatef(0.0f, 0.0f, -40.0f); // End Bolt list glEndList(); } // Called to draw the entire bolt void RenderScene(void) { glCallList(BOLT_LIST); // Flush drawing commands glFlush(); } You ll see that we defined some macros to identify the display lists more easily. These macros simply map to the numeric value that identifies the display list. Figure 10-10 shows the output from this new and improved spinning bolt program. The elapsed time for the example using display lists was just over 13 seconds, about a 2-second improvement. This may not seem like much, but wait a few chapters and come back and try it again with special effects such as texture mapping or NURBS surfaces. As mentioned earlier, 1,700 triangles is really a very small portion of what some larger and more complex scenes will consist of. Figure 10-10 Output from SLSTBOLT using display lists
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.