GL_TRIANGLES problem

well I gave created a many traingles now they are like wireframes i want to look them like a solid or shaded.
Plz help me.
Thanks in advance

before any draw call,


glPolygonMode( GL_FRONT, GL_FILL );

Take a look at glPolygonMode for more details.

You should probably use

glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );

instead, since separate front + back polygon modes are removed from the core profile of recent OpenGL versions.