My Triangle Is'nt Showing Up??

I am using OpenGL and i am trying to get this simple program to work, here is my code;

void DrawScene ( void )

	glMatrixMode ( GL_MODELVIEW );
	glLoadIdentity ( );
	glPushMatrix ( );
	glTranslatef ( -1.0f, 1.0f, 0.0f ); 
    glBegin ( GL_TRIANGLES );
    glVertex3f ( 0.5f, -0.5f, 0.0f );
    glVertex3f ( 0.0f, 0.5f, 0.0f );
    glVertex3f ( -0.5f, -0.5f, 0.0f );
	glPopMatrix ( ); 
	//end of triangle

	glutSwapBuffers ( );

I dont get any errors, the triangle just doesnt show up.

any help would be greatly appreciated

I am using Visual Studio C++ 2008 Express Edition and i have Windows XP.

Make sure the back face culling is set correctly.

If not texturing make sure you disable texture stages.

Projection matrix is set correctly before rendering with the viewport.

Your geometry have to be inside the view frustum, and make sure they lay after the near clipping plane.

Try to check for gl errors before every command if the above did not work.

what colour is your clear colour
what colour are you giving the vertices when you draw ?

it’s possible you are drawing them in black lol

don’t glTranslate. If projection matrix is identity you are effectively moving the triangle outside the view frustum.

Thanks guys!