View Full Version : Hidden Lines (and Visible Selection)

04-30-2004, 08:08 PM
I am just learning OpenGL and am hoping that
the following is (easily) possible.

I have a 3D object whose surface
is defined by simple polygons (triangles in
this case). As we know, only the "front"
polygons are visible in hidden line mode.
Is it possible to identify these polygons?

I'm thinking that once the hidden line removal
algorithm does its work, the display buffer
contains only the 2D screen drawing lines,
but I'd like to identify the 3D polys these
came from.

I hope my question is clear and makes sense.

Thanks for any help,


05-01-2004, 05:38 AM
You can use occlusion queries to identify these polygons. First you have to render the whole object and then you render it again with a seperate occlusion query per polygon.

Youc an find information about occlusion queries at http://oss.sgi.com/projects/ogl-sample/registry/