#else
#include<windows.h>
#include<GL/gl.h>
#include<GL/glaux.h>
#endif
GLvoid CALLBACK draw(void){ /*chú ý bạn có thể không cần chữ void
trong */
glClearColor(0.0,0.0,0.0,0.0); /*khi lập trình với VC, Glvoid là kiểu */
glClear(GL_COLOR_BUFFER_BIT);/*hàm trong opengl, nó tương tụ */
glClearColor(0.0,0.0,0.0,0.0); /*như void trong C hay C++*/
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_QUADS);
glColor3d(1.0,0.0,0.0);
glVertex2d(0.1,0.1);
glColor3d(0.0,1.0,0.0);
glVertex2d(0.9,0.1);
glColor3d(0.0,0.0,1.0);
glVertex2d(0.9,0.9);
glColor3d(1.0,0.0,1.0);
glVertex2d(0.1,0.9);
glEnd();
glFlush();
}
GLvoid CALLBACK resize(GLsizei w,GLsizei h)
{
glLoadIdentity();
}
int main(int argc, char *argv[])
{
auxInitDisplayMode(AUX_RGBA);
auxInitWindow(argv[0]);