A quadrics object consists of parameters, attributes, and callbacks that are stored in a data structure of type GLUquadricObj. A quadrics object may generate vertices, normals, texture coordinates, and other data, all of which may be used immediately or stored in a display list for later use.
Creating and rendering a quadric surface is similar to using the tessellator. To use a quadrics object, follow these steps.
To create a quadrics object, use gluNewQuadric().
Specify the rendering attributes for the
quadrics object
(unless you're satisfied with the default values).
Use gluQuadricOrientation() to control the winding direction and differentiate the interior from the exterior.
Use gluQuadricDrawStyle() to choose between rendering the object as points, lines, or filled polygons.
For lit quadrics objects, use gluQuadricNormals() to specify one normal
per vertex or one normal per face. The default is that no normals are generated at all.
For textured quadrics objects, use gluQuadricTexture() if you want to
generate texture coordinates.
Prepare for problems by registering an error-handling routine with gluQuadricCallback(). Then, if an error occurs during rendering, the routine you've specified is invoked.
Now invoke the rendering routine for the desired type of quadrics object:
gluSphere(), gluCylinder(), gluDisk(), or
gluPartialDisk(). For best performance for static data, encapsulate the
quadrics object in a display list.
When you are completely finished with it, destroy this object with gluDeleteQuadric(). If you need to create another quadric, it's best to reuse your quadrics object.