Viewing edges in 3D object

I drew a cube and filled with some color. But I am not able see its edges. How can I solve it.
thanks

If you don’t enable lighting, you won’t see anything but its silhouette.
Unless you draw each face with a different color (or use a texture).

Moz

I do not want to draw each face with different color. I enabled light. But I could not see faces as separate. Is light direction is imp?

Do you define normal vectors ?

YES I defined normal vectors. I took some example on net and looking into it. When I apply different colors for each face I can see it as cube. But when I buld complex model with several polygons(asume as mesh on 3D object), i should have color control and visibility. Any ideas?

In what color does the cube appear, what material properties did you set and what are the colors and position of your light ?
(I’m thinking it might be due to saturation)

I need to see position of light. What is material properties. Let me see light position first.

You need to set material properties to get proper lighting, the color you set with glColor is not used for lighting (well, unless you use glEnable(GL_COLOR_MATERIAL), but you’d rather use glMaterial first to get used to it).
Chapter 5 of the red book for your lighting lesson of the day : http://helios.scripps.edu/cgi-bin/infosr…OpenGL_PG/10431

Thank you very much. I will look into it.