#if defined(__APPLE__) && defined (__MACH__)
#   include <GLUT/glut.h>
#else
#   include <GL/glut.h>
#endif
#include <stdlib.h>
#include <stdio.h>

void display()
{
  glClear(GL_COLOR_BUFFER_BIT);
    glBegin(GL_POLYGON);
    glVertex2f(-0.5, -0.5);
    glVertex2f(-0.5, 0.5);
    glVertex2f(0.5, 0.5);
    glVertex2f(0.5, -0.5);
  glEnd();

  glFlush();
}

void init()
{
  glClearColor(1.0, 0.0, 0.0, 0.0);
  glColor3f(0.0, 0.0, 1.0);
}

int main(int argc, char** argv)
{
  glutInit(&argc, argv);
  glutCreateWindow("Test 1");
  glutDisplayFunc(display);
  init();
  glutMainLoop();
  return 0;
}

