Next: 15.3.2 Refinements
Up: 15.3 Gradual Cutaway Views
Previous: 15.3 Gradual Cutaway Views
  Contents
- Draw the object internals with depth buffering.
- Enable and configure a 1 dimensional texture ramp;
use GL_ ALPHA as the format.
- Enable and configure texture coordinate generation for the component;
use eye linear, and set the eye plane to map over the range
of the object shell cutaway from to .
- Enable blending, and set the blend mode: source is GL_ SRC_ALPHA,
destination is GL_ ONE_MINUS_SRC_ALPHA.
- Render the shell of the object in depth order; most distant objects first.
For convex shells, this could be done using face culling.
- Load a different texture ramp in the 1D texture map.
- Render the shell edges; you can do this by re-rendering the shell
after call glPolygonMode() with the mode set to GL_ LINE.
If you want to render the shell edges, you'll need to use polygon offset,
or some other method, such as using the stencil buffer, to avoid z fighting.
A reasonable setting to try would be glPolygonOffset-1.f, -1.f(-1.f, -1.f).
Next: 15.3.2 Refinements
Up: 15.3 Gradual Cutaway Views
Previous: 15.3 Gradual Cutaway Views
  Contents
2001-01-10