/*
File Name: TextureGOC.h
Created By: Andy Odle
Date: Mar 29, 2010

Description: 
*/

#ifndef TextureGOC_h
#define TextureGOC_h

#ifdef _WIN32
    #define _WIN32_WINNT 0x0501
    #include "windows.h"
#else
    // Xlib Headers.
    #include <X11/Xlib.h>
#endif

// Opengl Headers.
#include "GL/gl.h"
#include "GL/glu.h"
#include "GL/glext.h"

#include <string>
using namespace std;

#include "./source/inc/MathGOC.h"
#include "./source/soil/SOIL.h"

class TextureGOC
{
    public:
        
        TextureGOC();
        ~TextureGOC();

        // Set the sprite's texture rectangle.
        void SetTextureRectangle(RectangleGOC &textureRectangle_p);

        // Get the sprite's texture rectangle.
        RectangleGOC GetTextureRectangle(){return textureRectangle_m;}

        // Get loaded texture's id.
        int GetLoadedTextureID(){return textureID_m;}
        
        // Load and create a OpenGL texture.
        bool LoadTexture(string fileName_p);
    
        bool TextureLoaded(){return textureLoaded_m;}

        int GetWidth(){return width_m;}
        int GetHeight(){return height_m;}

    private:

        bool textureLoaded_m; // Is the texture loaded?

        int width_m;
        int height_m;
        unsigned int textureID_m; // Loaded texture id.

        RectangleGOC textureRectangle_m;

};

#endif
