Hidden Line Removal

Does OpenGL provide some support for Hidden Line Removal?


That’s scene management… a Jedi uses OpenGL for rendering primitivies, never for managing the scene.

Well horse hockey

GL_CULL_FACE is close, but only works for a single primitive. Guess I’ll have to work on some sort depth scheme, aye. Thanks for the response.


Try this:

Programming with OpenGL: Advanced Rendering : Line Rendering Techniques

Advanced Graphics Programming Techniques Using OpenGL : Line Rendering Techniques

I conceed that culling backfaces is vaguely similar, but it isn’t.

Culling faces like that is ONLY based on localised primitives when making assumptions about other primitives. It’s designed to quickly cull, on a per poloygon level, polys that probably shouldn’t won’t be seen. Think about a cube… you can cull the back faces based on their normal and never see them, but it ISN"T what you want if the cube is transparent, and even though the normals are pointing AWAY from the user, they’re still seen.

My point is… culling polys like this is local management; clipping hidden lines is more to do with scene management.

Why do I say this… well. In order to determine if a line can’t be seen, you need to know what it’s front of it. IMMEDIATELY you’re dealing with the scene. You need to know more than just the localised line, and you need to know how the data is constructed. This is entirely beyond OpenGL’s scope, beause ALL it cares about is one primitive at a time.

so, yes, in a way you ARE right. close, but no banana.


Good stuff Serge. Silhouette, hidden in grey, all the goodies. Thanks for the links.

john, First time I used GL_CULL_FACE was with the infamous cube. I thought I had the hidden line prob whipped. Looked great. Then I added a sphere to the scene, rotated the cube in front of it and found out otherwise