#!/usr/bin/perl -w
use strict;
use OpenGL qw/ :all /;
use Math::Trig;

use constant N_SHAPES => 7;

glutInit();
glutInitDisplayMode(GLUT_RGBA);
glutCreateWindow('test');
glutDisplayFunc(\&display);
init();
glutMainLoop();


sub display
{
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glColor3d(1.0, 0.0, 0.0);
#GL_POINTS GL_LINES GL_LINE_STRIP GL_LINE_LOOP GL_TRIANGLES GL_QUADS 
#GL_TRIANGLE_STRIP GL_QUAD_STRIP GL_TRIANGLE_FAN GL_POLYGON
  glBegin(GL_LINE_LOOP); 
    glVertex2d(-0.9, -0.9);
    glVertex2d( 0.9, -0.9);
    glVertex2d( 0.9,  0.9);
    glVertex2d(-0.9,  0.9);
  glEnd();
  glFlush();
}

sub init
{
	glClearColor(0.0, 0.0, 1.0, 1.0);
}
