#ifndef __TEXTURE_MAP_H__
#define __TEXTURE_MAP_H__

#include <vector>
#include <wx/string.h>
#include "material.h"

//enable OpenGL texture caching
#define USEOPENGL 1

namespace VRUT {

	// used for remember texture data from DDS textures
	class TextureMap
	{

	protected:

		std::vector<wxString> strings;
		std::vector<float *> data;
		std::vector<size_t> arraySizes;

	public:

		TextureMap();
		virtual ~TextureMap();

		/**
		* add texture data and string key and information about data size
		* \param[in] str - string key
		* \param[in] d - float texels data
		* \param[in] arraySize - size of array d
		**/
		void Add(const wxString& str, float * d, size_t arraySize);

		/**
		*	Getting texels data based on string key
		*	\param[in] str - key used to find texels data
		*	\param[out] arraySize - saved size of returning array
		*	\return float array - texels data
		*/
		float * GetData(const wxString& str, size_t & arraySize);

		/**
		*	Check if material has DDS texture and if has copy it to oglTextureMap - now don't checking shader textures
		*	\param[in] mat - material
		*/
		void CopyDDSTexDataToRayTracerTexData(const Material *mat);
	};
}

#endif /* __TEXTURE_MAP_H__ */
