#ifndef _OPENGL_H
#define _OPENGL_H 1

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <pthread.h>
#include <GL/glut.h>
#include <GL/gl.h>
#include <sys/types.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#define RESTART 2
#define PAUSED 3
#define EXIT 4
#include "extern_globals.h"

extern int My_argc;
extern char **My_argv;

//0 white 1 black
extern int my_team_color;
//0 no 1 yes
extern int my_turn;

extern int IS_Server;
extern int Send_OK;

extern struct pieces my_pieces[16];
extern struct pieces oponent_pieces[16];



void OpenGLInit(void);
void Animate(void );
void ResizeWindow(int w, int h);
int glutCreateMenu(void (*func)(int value));
//void glutAddMenuEntry(char *name, int value);
void glutAttachMenu(int button);
void processMenuEvents(int option);
void keyboard (unsigned char key, int x, int y);
//bool ignoreRepeats = false;

//void Create_OpenGL(int argc, char **argv);
void *Create_OpenGL(void *data);

void processMouse(int button, int state, int x, int y);

void Setup_Pieces(void);
void Adjust_Bounds(void);
void Valid_Destination(void);
void Valid_Source(void);




#endif
