How to create a filled version of a model?


If I have some model, let’s say a cube, and I want to use clipping planes on it such that it appears like a solid thing that is chopped up, how do I create the solid version of the model?
So for instance I have six face polygons to start with.


i have never done this but it might just work

  1. Use a clip plane to cut out the unwanted parts and then render the front faces.
  2. Render the back faces to the stencil buffer but not to the colorbuffer or depthbuffer.
  3. Render the clip plane with a polygon excluding some parts using the stencil buffer