/* Auteur: Nicolas JANEY */ /* nicolas.janey@univ-fcomte.fr */ /* Septembre 2004 */ /* Un programme OpenGL trop simple */ #include #include #include void scene(void) { glBegin(GL_POLYGON) ; glVertex2f(-0.5F,-0.5F) ; glVertex2f(-0.5F,0.5F) ; glVertex2f(0.5F,0.5F) ; glVertex2f(0.5F,-0.5F) ; glEnd() ; } void display(void) { glClear(GL_COLOR_BUFFER_BIT) ; scene(); glFlush(); } int main(int argc,char **argv) { glutInit(&argc,argv); glutInitDisplayMode(GLUT_RGBA|GLUT_SINGLE); glutInitWindowSize(200,200); glutInitWindowPosition(50,50); glutCreateWindow("Beaucoup Trop Simple"); glutDisplayFunc(display); glutMainLoop(); return(0); }