PDA

View Full Version : How to highlight visible edges



pospisil_m
01-07-2003, 02:57 AM
I have 3d objects (they are made from GL_POLYGON that are cover by repeating 2D textures.
I want to highlighted visible edges between polygons (to have line making a border). What is the easiest way how to do it ?

Eric
01-07-2003, 03:33 AM
If I understand correctly what you are trying to achieve, you could use the "polygon offset" feature and re-render your objects in wireframe.

Regards.

Eric

vincoof
01-07-2003, 04:01 AM
And for rendering in wireframe (assuming you're using the POLYGON primitive) the easiest way is to call glPolygonMode :

glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); // Faces will be rendered solid
glBegin(GL_POLYGON);
...
glEnd();
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); // Faces will be rendered in wireframe
glBegin(GL_POLYGON);
...
glEnd();