Graphics Reference
In-Depth Information
Second, note that the two outer tessellation param-
eters are the number of isolines and the number of points
in each isoline, respectively, while the inner tessellation
parameter is ignored, as in Figure 13.14.
Some different values of inner and outer spacing for
isolines is shown in Figure 13.15. Of course to produce
these you must eliminate the shrink geometry shader in
the .glib file, since you will not be producing any triangles
for it to shrink. You will also need to move the lighting and
the multiplication by the projection matrix from the geom-
etry shader to the tessellation evaluation shader.
Figure 13.14. The effect of the two
outer tessellation parameters.
Figure 13.15. The Bézier surface shown as a collection of isolines. uOuter0 = uOuter1 = 5
(left); uOuter0 = 5., uOuter1 = 50 (middle); uOuter0 = uOuter1 = 50 (right).
Sphere Subdivision
Spheres offer some interesting display challenges. The simplest kind of
sphere display is the GLUT sphere; this subdivides the sphere along latitude
and longitude. There are times when you want to display a sphere while con-
trolling the number and layout of the triangles to achieve an appropriately
smooth surface. In this example we use the triangles patern for the tessella-
tion layout.
Search WWH ::




Custom Search