How to highlight visible edges

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 ?

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

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();