29 lines
547 B
C
29 lines
547 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <windows.h>
|
|
#include "glut.h"
|
|
|
|
void afficher(void)
|
|
{
|
|
glMatrixMode(GL_PROJECTION);
|
|
glLoadIdentity();
|
|
glOrtho(-1.0,1.0,-1.0,1.0,-1.0,1.0);
|
|
glClearColor(0.0,0.0,0.0,0.0);
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
glColor3f(1.0,1.0,1.0);
|
|
glBegin(GL_POLYGON);
|
|
glVertex2f(-0.7,-0.7);
|
|
glVertex2f(-0.7, 0.7);
|
|
glVertex2f( 0.7, 0.7);
|
|
glVertex2f( 0.7,-0.7);
|
|
glEnd();
|
|
glFlush();
|
|
}
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
printf("Hello, World!");
|
|
afficher();
|
|
return EXIT_SUCCESS;
|
|
} |