#Include #Include
#Include #Include
#Include #Include
void display() {
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_QUADS);
glColor3f(1.0f, 0.0f, 0.0f); // Red
glVertex2f(0.5,1.0);
glVertex2f( 0.5,0.8 );
glVertex2f( 0.3,0.7 );
glVertex2f(0.3,0.9 );
glEnd();
glBegin(GL_TRIANGLES);
glColor3f(0.0,1.0,0.0);
glVertex2f(0.1,0.9);
glVertex2f(0.8,0.1);
glVertex2f(0.8,0.3);
glEnd();
glBegin(GL_LINES);
glColor3f(0.0,0.0,1.0);
glVertex2f(0.3,0.7);
glVertex2f(0.1,0.7);
glEnd();
glBegin(GL_LINE_STRIP);
glColor3f(0.0,1.0,0.0);
glVertex2f(0.3,0.3);
glVertex2f(0.2,0.4);
glVertex2f(0.4,0.5);
glVertex2f(0.2,0.6);
glEnd();
glBegin(GL_LINE_LOOP);
glColor3f(0.0,1.0,1.0);
glVertex2f(0.8,0.5);
glVertex2f(1.0,0.4);
glVertex2f(1.0,0.2);
glVertex2f(0.9,0.2);
glVertex2f(0.85,0.3);
glEnd();
glBegin(GL_TRIANGLE_STRIP);
glColor3f(1.0,1.0,0.0);
glVertex2f(0.8,0.9);
glVertex2f(0.7,1.0);
glVertex2f(0.7,0.7);
glVertex2f(0.7,0.5);
glVertex2f(0.8,0.7);
glVertex2f(0.7,0.7);
glEnd();
glBegin(GL_QUAD_STRIP);
glColor3f(0.0, 1.0, 0.0);
glVertex2f(0.1,0.2);
glVertex2f( 0.1,0.4 );
glVertex2f( 0.2,0.3 );
glVertex2f( 0.2,0.2);
glEnd();
glBegin(GL_TRIANGLE_FAN);
glColor3f(1.0,0.0,0.0);
glVertex2f(-0.1,-0.6);
glVertex2f(-0.1,-0.9);
glVertex2f(-0.2,-0.75);
glColor3f(0.0,1.0,0.0);
glVertex2f(-0.3,-0.6);
glColor3f(0.0,0.0,1.0);
glVertex2f(-0.3,-0.9);
glColor3f(1.0,1.0,0.0);
glVertex2f(-0.1,-0.9);
glEnd();
glBegin(GL_POLYGON);
glColor3f(1.0,0.0,0.0);
glVertex2f(-0.3,-0.1);
glVertex2f(-0.5,-0.3);
glVertex2f(-0.5,-0.5);
glVertex2f(-0.5,-0.3);
glVertex2f(-0.1,-0.3);
glEnd();
glFlush();
}