View Full Version : reconstruct poly from stencil or clip buffer
03-05-2006, 04:13 AM
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.
03-07-2006, 04:36 AM
If i understand your meaning, there are two ways to clip the objects:
1.The stencil Buffer
However , some functions such as gluPerspective(), glFrustum() and glOrtho() define a view volume that clips some objects .
03-07-2006, 04:54 AM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.