#include "materiallayer.h"
#include "texture.h"
#include "m3derror.h"

namespace M3D {

MaterialLayer::MaterialLayer() : 
		_layer_type_(M3DML_NOBLOCK)
{
}


MaterialLayer::~MaterialLayer()
{
}

void MaterialLayer::set_layer_type()
{
	switch (_layer_type_)
	{
		case M3DML_DIFFUSE: _layer_name_ = "Diffuse"; break;
		case M3DML_AMBIENT: _layer_name_ = "Ambient"; break;
		case M3DML_SHININESS: _layer_name_ = "Shininess"; break;
		case M3DML_SPECULAR: _layer_name_ = "Specular"; break;
		case M3DML_EMISSION: _layer_name_ = "Emission"; break;
		case M3DML_NORMAL_MAP: _layer_name_ = "NormalMap"; break;
		case M3DML_BUMP_MAP: _layer_name_ = "BumpMap"; break;
		case M3DML_ROUGHNESS: _layer_name_ = "Roughness"; break;
		default: THROW("Invalid layer type");
	}
}

}

