#ifndef __Material__
#define __Material__

#ifndef CORE_DLL 
    #ifdef CORE_BUILD
	    #define CORE_DLL __declspec(dllexport)
    #else
	    #define CORE_DLL __declspec(dllimport)
        #pragma comment(lib, "Core.lib")
    #endif
#endif

#include "Texture.h"

#include <string>

class CORE_DLL Material {
public:
    Material(const wchar_t* fileName = L"");
    virtual ~Material();

    const wchar_t* getFileName();
    void setFileName(const wchar_t* fileName);

    void* getResourceHandle();
    void  setResourceHandle(void* resourceHandle);

    float* getDiffuse();
    float* getSpecular();
    float* getAmbient();

    void setDiffuse(float r, float g, float b, float a);
    void setSpecular(float r, float g, float b, float a);
    void setAmbient(float r, float g, float b, float a);

    Texture** ppGetDiffuseTexture();
    Texture*  getDiffuseTexture();
    void      setDiffuseTexture(Texture* texture);

    Texture** ppGetSpecularTexture();
    Texture*  getSpecularTexture();
    void      setSpecularTexture(Texture* texture);

    Texture** ppGetAmbientTexture();
    Texture*  getAmbientTexture();
    void      setAmbientTexture(Texture* texture);

    Texture** ppGetNormalMap();
    Texture*  getNormalMap();
    void      setNormalMap(Texture* texture);

protected:
    std::wstring _fileName;
    void* _resourceHandle;

    float _diffuse[4];
    float _specular[4];
    float _ambient[4];

    Texture* _diffuseTexture;
    Texture* _specularTexture;
    Texture* _ambientTexture;
    Texture* _normalMap;
};

#endif