/* This include needs to be included before glut.h for things to
   compile in Windows. Otherwise you get a redefinition of exit() */

#ifdef __linux__
#include <GL/glut.h>
#include <GL/glu.h>
#include <GL/freeglut.h>
#include <unistd.h>
void _sleep (unsigned int t)
{
  usleep(t*1000);
}
#endif /* __linux__ */

#ifdef _WIN32
// Dont run the console window, just the glut window!
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" ) 
#include "windows.h"
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/freeglut.h>
void _sleep (int t)
{
  Sleep(t);
}
#endif /* __WIN32__ */

#include <stdlib.h>
#include <stdio.h>
#include <math.h>

/* ascii codes for various special keys */
#define ESCAPE 27
#define ENTER 13
/* Use GLUT_KEY_UP and so forth for other keys, look in glut.h for more */

/* useful macros */
#define max(a,b) (((a)>(b))?(a):(b))
#define min(a,b) (((a)<(b))?(a):(b))
