i need help can u me i got home work and the triangle isnt showing up
#include <GL/glut.h>
void init (void)
{
glClearColor (1.0, 1.0, 1.0, 0.0); // Set display-window color to white.
glMatrixMode (GL_PROJECTION); // Set projection parameters.
gluOrtho2D (0.0, 200.0, 0.0, 200.0);
}
void lineSegment (void)
{
glClear (GL_COLOR_BUFFER_BIT); // Clear display window.
glColor3f (0.0, 0.85, 1.0); // Set line segment color to red.
glBegin(GL_QUADS);
glVertex2i(50, 150);
glVertex2i(50, 100);
glVertex2i(150, 100);
glVertex2i(150, 150);
glBegin(GL_QUADS);
glVertex2i(85, 160);
glVertex2i(85, 150);
glVertex2i(115, 150);
glVertex2i(115, 160);
glBegin(GL_TRIANGLES);
glVertex2i(75, 160);
glVertex2i(100, 180);
glVertex2i(125, 160);
glEnd();
glFlush ( ); // Process all OpenGL routines as quickly as possible.
}
void main (int argc, char** argv)
{
glutInit (&argc, argv); // Initialize GLUT.
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); // Set display mode.
glutInitWindowPosition (100, 150); // Set top-left display-window position.
glutInitWindowSize (400, 400); // Set display-window width and height.
glutCreateWindow (“An Example OpenGL Program”); // Create display window.
init ( ); // Execute initialization procedure.
glutDisplayFunc (lineSegment); // Send graphics to display window.
glutMainLoop ( ); // Display everything and wait.
}