#ifndef PW_VISUAL_TEXTURE_HPP
#define PW_VISUAL_TEXTURE_HPP

#include <pw/core/globals.hpp>
#include <pw/core/image.hpp>
#include <pw/core/debug.hpp>

namespace pw {

class texture {

	enum texture_type {
		color,
		normal
	};

	enum texture_shape {
		shape_2d,
		shape_3d
	};

	enum texture_dimension {
		dimension_s,
		dimension_t,
		dimension_r
	};

	enum wrap_mode {
		wrap_repeat,
		wrap_clamp,
		wrap_clamp_to_edge,
		wrap_clamp_to_repeat
	};

	texture();

	texture(shared_ptr<image> i,texture_shape s,texture_type = color);


	void set_image(shared_ptr<image> i);
	shared_ptr<image> get() const { return _image; }

	void set_type(texture_type t);
	texture_type type() const { return  _type; }

	void set_shape(texture_shape s);
	texture_shape shape() const { return _shape; }

	void set_wrap(wrap_mode w);
	wrap_mode wrap() const { return _wrap; }

	void generate_mipmaps();

protected:

	shared_ptr<image> _image;

	texture_type _type;
	texture_shape _shape;
	wrap_mode _wrap;

	struct impl;
	unique_ptr<impl> _impl;


};

}


#endif
