Such subdivision is called tessellation, and the GLU provides a collection of routines that perform tessellation. If your application requires the display of concave polygons, polygons containing holes, or polygons with intersecting edges, those polygons must first be subdivided into simple convex polygons before they can be displayed. A polygon is simple if the edges intersect only at vertices, there are no duplicate vertices, and exactly two edges meet at any vertex. "Quadrics: Rendering Spheres, Cylinders, and Disks" describes how to generate spheres, cylinders, circles and arcs, including data such as surface normals and texture coordinates.Īs discussed in "Describing Points, Lines, and Polygons" in Chapter 2, OpenGL can directly display only simple convex polygons."Polygon Tessellation" explains how to tessellate convex polygons into easier-to-render convex polygons.This chapter has the following major sections. Where the basic OpenGL operates upon simple primitives, such as points, lines, and filled polygons, the GLU can create higher-level objects, such as the surfaces of spheres, cylinders, and cones. To optimize performance, the basic OpenGL only renders convex polygons, but the GLU contains routines to tessellate concave polygons into convex ones, which the basic OpenGL can handle. Only two GLU topics remain: polygon tessellators and quadric surfaces, and those topics are discussed in this chapter. The GLU NURBS facilities, which are built atop OpenGL evaluators, are covered in Chapter 12. The use of gluPickMatrix() is explained in Chapter 13. Several matrix transformation GLU routines ( gluOrtho2D(), gluPerspective(), gluLookAt(), gluProject(), and gluUnProject()) are described in Chapter 3. Mipmapping ( gluBuild*DMipmaps()) and image scaling ( gluScaleImage()) are discussed along with other facets of texture mapping in Chapter 9. Some of the GLU operations are covered in other chapters. The OpenGL Utility Library (GLU) complements the OpenGL library, supporting higher-level operations. The OpenGL library (GL) is designed for low-level operations, both streamlined and accessible to hardware acceleration. Use the GLU library to create quadrics objects to render and model the surfaces of spheres and cylinders and to tessellate disks (circles) and partial disks (arcs).Render concave filled polygons by first tessellating them into convex polygons, which can be rendered using standard OpenGL routines.After reading this chapter, you'll be able to do the following:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |