Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does GLU render sphere, cylinder, and disk primitives?

0
Posted

How does GLU render sphere, cylinder, and disk primitives?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.