How does GLU render sphere, cylinder, and disk primitives?
There is nothing special about how GLU generates these primitives. You can easily write routines that do what GLU does. You can also download the Mesa source, which contains a GLU distribution, and see what these routines are doing. The GLU routines approximate the specified primitive using normal OpenGL primitives, such as quad strips and triangle fans. The surface is approximated according to user parameters. The vertices are generated using calls to the sinf() and cosf() math library functions. If you are interested in rendering cylinders and tubes, you’ll want to examine the GLE library. GLE comes as part of the GLUT distribution.