#pragma once

#include <string.h>
#include "materiallayer.h"
#include "Interfaces/textureinterface.h"
#include <GL/glew.h>

namespace M3D
{
class Texture;

/**
	@author Denis A. Biryukov <denis.birukov@gmail.com>
*/
class TextureLayer : public MaterialLayer
{
	public:
		virtual void set_layer(OpenGLState *state);
		virtual void load( const std::string &base_dir, M3DML_BLOCK_TYPE block_type, const M3DML_Layer *layer, EngineInterface *engine );
		TextureLayer();
		~TextureLayer();
	private:
		std::string _texture_path_;
		Texture *_texture_;
		TextureInterface _tex_id_;
		GLuint _texture_unit_;
};

}
