#pragma once
#include "PosMaterial.h"
#include "DXUT.h"
#include "DXUTmisc.h"
#include "EffectManager.h"
#include "MaterialStruct.h"


class Material : public PosMaterial
{
	private:
	string name;
	MaterialPack material;
	int nrOfTextures;
	string textureFileName;
	string normalMapFileName;
	int textureLevel;
	ID3D10ShaderResourceView* textureResource;
	ID3D10ShaderResourceView* normalMapResource;
	BOOL hasEmissive;

	public:
	void setName(string name);
	string getName();
	void setAmbientColor(float* ambient);
	void setDiffuseColor(float* diffuse);
	void setSpecularColor(float* specular,float exp);
	void setEmissiveColor(float* emissive);
	void setNumTextures(int numTextures);
	void setTextureFilename(int level, string textureFilename);
	void sendToEffect(Effect* effect);
	void setHasEmissive(bool hasemissive);
	void setHasSpecular(bool hasSpec);
	void loadTextures();
	~Material();
};