Solid Geometry

Hi
I want to draw objects of solid geometry like tetrahedron, cube…
I want to draw the line which can’t be seen as DOT_STYLE (like objects are drawn in school-book) and when I rotate the object this line will be redraw, if It’s can be seen it will drawn in normal style, and the others can’t be seen will be in DOT_STYLE
How can’t I do that or is there any library suport it and how to use it?.
Thanks!

Look for line stipple

Thanks
when I write
glPolygonMode(GL_FRONT , GL_LINE);
glEnable(GL_LINE_STIPPLE);
glLineStipple(3,3);
glPolygonMode(GL_BACK , GL_LINE);
It change all poygon’s line but I only want it change back-face

You can do several pass:

glEnable( GL_CULL_FACE );
glEnable( GL_POLYGON_OFFSET_FILL );
glPolygonOffset( 1.0F, 1.0F );
// … Draw Faces …
glDisable( GL_POLYGON_OFFSET_FILL );

glDisable( GL_CULL_FACE );
glDisable( GL_DEPTH_TEST );
glLineWidth( 0.9F );
glEnable( GL_LINE_STIPPLE );
glLineStipple( 1, 0x0F0F );
glColor3f( 0.3F, 0.3F, 0.3F );
// … Draw Edges …
glDisable( GL_LINE_STIPPLE );
glEnable( GL_DEPTH_TEST );

glEnable( GL_CULL_FACE );
glDepthFunc( GL_LEQUAL );
glDepthMask( GL_FALSE );
glLineWidth( 1.0F );
glColor3f( 0, 0, 0 );
// … Draw Edges …
glDepthFunc( GL_LESS );
glDepthMask( GL_TRUE );
glDisable( GL_CULL_FACE );

Hope this helps you,
Thomas.