#ifndef MATERIAL_H
#define MATERIAL_H

#include "object.h"
#include <string>

namespace CBK
{
	class Material : public Object
	{
	public:
		Material(const std::string& name, IDirect3DDevice9* device = 0);
		~Material(void);

		Material& load(const std::string& name);

		void apply(void);

		static void clear(IDirect3DDevice9* device);

		static unsigned long numMaterialChanges;

		virtual Object& reset(void);
			
	protected:
		D3DMATERIAL9* material;

	private:
		static Material* currentMaterial;
	};
}

#endif //MATERIAL_H