OpenGL Super Bible! Page 361 Chapter (Zeus web server) 10 3D
OpenGL Super Bible! Page 361 Chapter 10 3D Modeling and Object Composition What you ll learn in this chapter: How to Functions You ll Use Assemble polygons to create 3D objects glBegin/glEnd/glVertex Optimize object display with display lists glNewList/glEndList/glCallList Your quiver is quite full of OpenGL arrows by now and it s time to go hunting. Unlike previous chapters, this is going to be a project chapter, where you can put some of this stuff to practical use. We are going to define a problem or goal and pursue it to its logical end: a finished program. Along the way, you ll gain some insight in how to break your objects and scenes into smaller, more manageable pieces. We ll compose a complex object out of smaller, simpler objects, which in turn are composed of just the OpenGL primitives. As a finishing touch we ll show you why and how to apply display lists. One of the biggest reasons for using display lists is speed, so for the icing on the cake, we ll even give you a crude but effective means of benchmarking your code. Defining the Task To demonstrate building a figure out of smaller simpler figures, we will use an interesting, yet simple example that creates a model of a metallic bolt (like those holding your disk drive together). Although this particular bolt may not exist in any hardware store, it will have the essential features. We shall make the bolt as simple as possible while still retaining the flavor of our task. The bolt will have a six-sided head and a threaded shaft, like many typical steel bolts. Since this is a learning exercise, we ll simplify the threads by making them raised on the surface of the bolt shaft rather than carved out of the shaft. Figure 10-1 is a rough sketch of what we re aiming for. We will build the three major components of this bolt the head, the shaft, and the threads individually and then put them together to form the final object.
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.