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

/* C++ Header Files */
#include <map>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <vector>
#include <ctime>
#include <cmath>
/* 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 "../TEX/targa.h"
#include "../TEX/texture.h"
#include "../CONF/config.h"
#include "../CONF/uniform.h"
#include "../CONF/geometry.h"

//---------------------------------------------------------------------------

/* Standard */
using namespace std;

using std::vector;
using std::string;
using std::ifstream;
using std::map;

//---------------------------------------------------------------------------

enum FLYBOX_SIDES {
        SS_NORTH = 0,
        SS_EAST,
        SS_SOUTH,
        SS_WEST,
        SS_TOP,
        SS_BOTTOM,
        SS_MAX_SIDES
};

//---------------------------------------------------------------------------

/* Class Flybox */
class FLYBOX
{
public:
        /* Flybox */
        void textureLoader();
        void MipmapsImage2(const GLint count, int side3, GLubyte *pixel);
        bool initBox();
        
        /* Render BOX */
        void vertexBox(); 
        void renderBox(); 
        void render(float x, float y, float z, unsigned int s_basicProgram);
        
private:
        /* Texture */
        GLubyte* w_images[SS_MAX_SIDES];
        GLuint w_texID[SS_MAX_SIDES];
};

//---------------------------------------------------------------------------

#endif

