Sie sind auf Seite 1von 1

#include<GL/glut.

h>
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POLYGON);
glColor3f(0.0f,1.0f,0.0f);
glVertex2f(-0.1f,-1.0f);
glVertex2f(1.0f,-1.0f);
glVertex2f(0.0f,1.0f);
glVertex2f(-0.2f,2.0f);
glVertex2f(1.0f,2.0f);
glEnd();
glFlush();
}
void main(int argc,char** argv)
{
glutInit(&argc,argv);
glutCreateWindow("polygon");
glutPositionWindow(10,00);
glClearColor(1,1,1,0);
glutDisplayFunc(display);
glutMainLoop();
}

Das könnte Ihnen auch gefallen