reconstruct poly from stencil or clip buffer

I clip a 3d object then i use the stecil buffer to fill the cutoff. Is there a way of constructing the polygon out of the stecil or clip buffer. Any help would be appreciated.

If i understand your meaning, there are two ways to clip the objects:
1.The stencil Buffer
2.Clip planes
However , some functions such as gluPerspective(), glFrustum() and glOrtho() define a view volume that clips some objects .
-Ehsan-

Originally posted by th0r1000:
I clip a 3d object then i use the stecil buffer to fill the cutoff. Is there a way of constructing the polygon out of the stecil or clip buffer. Any help would be appreciated.
No, not inside OpenGL. Using any of the rasterization informations on screen will never match good enough.

You should calculate the intersection of your polygon with the clip plane yourself for a perfect fit.
This can get arbitrarily complex depending on the number of individual polygons the clipping generates.