#ifndef INCLUDED_PANELS_VISIBILITYHANDLER
#define INCLUDED_PANELS_VISIBILITYHANDLER

#include <Math/Point.h>

#include <GLES/gl.h>

#include <memory>
#include <vector>

//////////////////////////////////////////////////////////////
namespace Dubious {
namespace Utility {
class NativeAssetFile;
class FilePath;
typedef std::shared_ptr<NativeAssetFile> NativeAssetFilePtr;
}
namespace Renderer {
class PngImage;
typedef std::shared_ptr<PngImage> PngImagePtr;
}
namespace Panels {
class Font;

/// @brief Provides tools for drawing panels
///
/// This class is intended to provide a set of helper functions to
/// make it easier to draw your own panels.  It is not designed as a
/// specific class to actually draw anything.  It makes it easier
/// to bind textures, define squared, and do other OpenGL stuff
/// that seems handy.  Basically it's a collection of util functions
class VisibilityHandler
{
public:

	struct GLPoint
	{
		GLPoint( float X, float Y, float TexX, float TexY )
		{
			m_X = X;
			m_Y = Y;
			m_TexX = TexX;
			m_TexY = TexY;
		}
		float m_X, m_Y;
		float m_TexX, m_TexY;
	};
	typedef std::vector<GLPoint> GLPointVector;
	static const unsigned int GLPOINT_SIZE = 4*sizeof(float);

	void				CreateGLVertexArrays( const Math::Size& Dimensions, GLPointVector& Points, std::vector<unsigned short>& Indices );
	void				CreateGLVertexArrays( const std::string& Text, const Font& TheFont, GLPointVector& Points, std::vector<unsigned short>& Indices );
	void 				BindTexture( Utility::NativeAssetFilePtr pNativeFile, GLuint Texture );
	void 				BindTexture( Renderer::PngImagePtr pImage, GLuint Texture );

protected:

	VisibilityHandler();
	~VisibilityHandler();

private:
};

}
}

#endif
