L'exécutable
Le source: CarreBlanc.cpp
#include <windows.h>
#include <GL/gl.h>
#include <GL/glaux.h>
void main(void) {
auxInitDisplayMode(AUX_SINGLE|AUX_RGBA) ;
auxInitPosition(10,10,200,200) ;
auxInitWindow("Carré blanc") ;
glClearColor(0.0F,0.0F,0.0F,0.0F) ;
glClear(GL_COLOR_BUFFER_BIT) ;
glColor3f(1.0F,1.0F,1.0F) ;
glOrtho(-1.0,1.0,-1.0,1.0,-1.0,1.0) ;
glBegin(GL_POLYGON) ;
glVertex2f(-0.5F,-0.5F) ;
glVertex2f(-0.5F,0.5F) ;
glVertex2f(0.5F,0.5F) ;
glVertex2f(0.5F,-0.5F) ;
glEnd() ;
glFlush() ;
while ( 1 ) ;
}
RETOUR