Page 280 OpenGL Super Bible! was specified for (Web hosting unlimited bandwidth)
Sunday, July 22nd, 2007Page 280 OpenGL Super Bible! was specified for the last vertex. The only exception is for a GL_POLYGON primitive, in which case the color is that of the first vertex.) Then the code in Listing 8-1 sets the top of the triangle to be pure red, the lower-right corner to be green, and the remaining bottom-left corner to be blue. Because smooth shading is specified, the interior of the triangle is shaded to provide a smooth transition between each corner. The output from the TRIANGLE program is shown in Figure 8-11. This represents the plane shown graphically in Figure 8-10. Figure 8-11 Output from the TRIANGLES program Polygons, more complex than triangles, can also have different colors specified for each vertex. In these instances, the underlying logic for shading can become more intricate. Fortunately, you never have to worry about it with OpenGL. No matter how complex your polygon, OpenGL will successfully shade the interior points between each vertex. Note that you will rarely wish to do this type of shading yourself, anyway. This is primarily used to produce lighting effects, and OpenGL once again comes to the rescue. We ll cover lighting in the Chapter 9. Windows Palettes The TRIANGLE and CCUBE example programs work reasonably well regardless of how many colors are available. If you can change the color depth of your system, try running these programs at the various color depths, starting at 16 colors and going up to 16 million if possible. You ll notice that the colors make a smooth transition regardless of color depth, but the higher color depths provide a smoother and more appealing image. Figures 8-12a and 8-12b show the output of the TRIANGLES sample with 16 colors and 16 million colors, respectively. Even though these pictures are not in color, you can see how much smoother the second triangle appears.
You want to have a cheap webhost for your apache application, then check apache web hosting services.