2019-04-25 10:09:56 +08:00
|
|
|
|
#include"VKMaterial.h"
|
2019-04-25 21:57:37 +08:00
|
|
|
|
#include"VKDescriptorSets.h"
|
|
|
|
|
#include"VKShader.h"
|
2019-04-26 21:43:22 +08:00
|
|
|
|
#include"VKVertexInput.h"
|
2019-04-25 10:09:56 +08:00
|
|
|
|
VK_NAMESPACE_BEGIN
|
|
|
|
|
Material::~Material()
|
|
|
|
|
{
|
|
|
|
|
delete dsl_creater;
|
|
|
|
|
delete shader;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MaterialInstance *Material::CreateInstance()
|
|
|
|
|
{
|
2019-04-26 21:43:22 +08:00
|
|
|
|
VertexInputStateInstance *vis_instance=vis->CreateInstance();
|
|
|
|
|
|
|
|
|
|
return(new MaterialInstance(this,vis_instance));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MaterialInstance::~MaterialInstance()
|
|
|
|
|
{
|
|
|
|
|
delete vis_instance;
|
2019-04-25 10:09:56 +08:00
|
|
|
|
}
|
|
|
|
|
VK_NAMESPACE_END
|