/*********************************************************************
*                                                                    *          
*                              FLY                                   *
*                           --E#Y#E--				     *
*                         ===MUSCLE===                               *
*                                                                    *
*********************************************************************/
#ifndef OPENGL_H_
#define OPENGL_H_

/* C Header Files */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <fcntl.h>
#include <unistd.h>
#include <math.h>
#include <sys/types.h>
#include <time.h>
/* OpenGL */
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glx.h>
#include <GL/glu.h>
#include <GL/glext.h>
#include <GL/glxext.h>
/* Flysimulator */
#include "../WIN/win.h"
#include "../TEX/texture.h"
#include "../CONF/config.h"
#include "../CONF/uniform.h"
#include "../CONF/geometry.h"
#include "../FONT/font.h"
#include "../OGL/move.h"
#include "../OGL/cube.h"
#include "../OGL/flybox.h"
#include "../OGL/cockpit.h"

/*---------------------------------------------------------------------------*/

struct F_Color {
        float fr, fg, fb, fa;
};

struct F_Textur {
        float fs, ft;
};

struct F_Vertex {
        float fx, fy, fz;
};

/*---------------------------------------------------------------------------*/

/* Init */
void loadTexture();
void glewStatus();
char textureShader3();
char initMain();
char initGrid();

/* Coordinates */
float F_Vertex(float fx, float fy, float fz);
float F_Color(float fr, float fg, float fb, float fa);
float F_Textur(float fs, float ft);

/* Render */
void GridRender(const char *nFile);
void PolygonCircle(const GLenum mode, const GLenum front, const char *nFile);
void DrawCircle(const GLenum mode, const GLenum front, const GLint count, const GLint offset);

/* Image */
void SubImage(const GLint count, const char *nFile, GLubyte *pixel);

/* Move */
void pointSpeed(float dt);
void pointGrid(float dt);

/* Objects */
void vectorObjects();
void polygonObjects(); 
void textureObjects(); 
void vertexObjects(); 
void renderObjects(); 
void Landscape(int width, int height);

/* Cupe Map */
void CubeMap();

/* Process Event */
void process_event1(XEvent report);

/*---------------------------------------------------------------------------*/

#endif

