I am using OpenGL and i am trying to get this simple program to work, here is my code;
void DrawScene ( void )
{
glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glMatrixMode ( GL_MODELVIEW );
glLoadIdentity ( );
//Triangle
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 );
glEnd();
glPopMatrix ( );
//end of triangle
glutSwapBuffers ( );
}
I dont get any errors, the triangle just doesnt show up.
any help would be greatly appreciated :)