The GLU includes a set of routines to draw various simple surfaces (spheres, cylinders, disks, and parts of disks) in a variety of styles and orientations. These routines are described in detail in the OpenGL Reference Manual; their use is discussed briefly in the following paragraphs, and their prototypes are also listed.
To create a quadric object, use gluNewQuadric(). (To destroy this object when you're finished with it, use gluDeleteQuadric().) Then specify the desired rendering style, as follows, with the appropriate routine (unless you're satisfied with the default values):
Whether surface normals should be generated, and if so, whether there should be one normal per vertex or one normal per face: gluQuadricNormals()
Whether texture coodinates should be generated: gluQuadricTexture()
Which side of the quadric should be considered the outside and which the inside: gluQuadricOrientation()
Whether the quadric should be drawn as a set of polygons, lines, or points: gluQuadricDrawStyle()
After you've specified the rendering style, simply invoke the rendering routine for the desired type of quadric object: gluSphere(), gluCylinder(), gluDisk(), or gluPartialDisk(). If an error occurs during rendering, the error-handling routine you've specified with gluQuadricCallBack() is invoked.
It's better to use the *Radius, height, and similar arguments to scale the quadrics rather than the glScale*() command, so that unit-length normals that are generated don't have to be renormalized. Set the loops and stacks arguments to values other than 1 to force lighting calculations at a finer granularity, especially if the material specularity is high.
The prototypes are listed in three categories.
Manage quadric objects:
Control the rendering:
Specify a quadric primitive:
OpenGL Programming Guide