March 2013
Intermediate to advanced
984 pages
26h 18m
English
OpenGL automatically clips geometry against the near and far planes as well as the viewport. User clipping refers to adding additional clip planes at arbitrary orientations, intersecting your geometry, such that the display sees the geometry on one side of the plane, but not on the other side. You might use one, for example, to show a cut away of a complex object.
OpenGL user clipping is a joint effort between OpenGL and a special built-in vertex shader array, gl_ClipDistance, which you are responsible for setting. This variable lets you control where vertices are in relation to a plane. Normal interpolation then assigns distances to the fragments between the vertices. Example 5.2 shows a straight-forward use of this built-in ...