few about MaterialInstance
This commit is contained in:
@@ -9,7 +9,7 @@ namespace hgl
|
||||
{
|
||||
class DeviceBuffer;
|
||||
class Texture;
|
||||
class MaterialInstance;
|
||||
class Material;
|
||||
|
||||
class DescriptorBinding
|
||||
{
|
||||
@@ -92,7 +92,7 @@ namespace hgl
|
||||
texture_map.DeleteByValue(tex);
|
||||
}
|
||||
|
||||
bool Bind(MaterialInstance *);
|
||||
bool Bind(Material *);
|
||||
};//class DescriptorBinding
|
||||
}//namespace graph
|
||||
}//namespace hgl
|
||||
|
@@ -4,13 +4,12 @@
|
||||
#include<hgl/graph/VK.h>
|
||||
#include<hgl/type/Map.h>
|
||||
#include<hgl/type/String.h>
|
||||
#include<hgl/type/Collection.h>
|
||||
#include<hgl/graph/VKShaderModuleMap.h>
|
||||
#include<hgl/graph/VKDescriptorSetType.h>
|
||||
VK_NAMESPACE_BEGIN
|
||||
using ShaderStageCreateInfoList=List<VkPipelineShaderStageCreateInfo>;
|
||||
|
||||
using MaterialParameterArray=MaterialParameters *[DESCRIPTOR_SET_TYPE_COUNT];
|
||||
|
||||
struct MaterialData
|
||||
{
|
||||
UTF8String name;
|
||||
@@ -25,7 +24,9 @@ struct MaterialData
|
||||
|
||||
PipelineLayoutData *pipeline_layout_data;
|
||||
|
||||
MaterialParameterArray mp_array;
|
||||
MaterialParameters *mp_array[DESCRIPTOR_SET_TYPE_COUNT];
|
||||
|
||||
uint32_t mi_data_bytes;
|
||||
|
||||
private:
|
||||
|
||||
@@ -42,6 +43,8 @@ class Material
|
||||
{
|
||||
MaterialData *data;
|
||||
|
||||
Collection *mi_data;
|
||||
|
||||
private:
|
||||
|
||||
friend GPUDevice;
|
||||
|
@@ -50,6 +50,8 @@ protected:
|
||||
|
||||
VIL *vil;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Material * GetMaterial () {return material;}
|
||||
|
@@ -75,8 +75,6 @@ public:
|
||||
const AABB & GetBoundingBox ()const{return primitive->GetBoundingBox();}
|
||||
|
||||
const VertexInputData * GetVertexInputData ()const{return vertex_input;}
|
||||
|
||||
MaterialParameters *GetMP (const DescriptorSetType &type){return mat_inst->GetMP(type);}
|
||||
};//class Renderable
|
||||
|
||||
Renderable *CreateRenderable(Primitive *,MaterialInstance *,Pipeline *);
|
||||
|
Reference in New Issue
Block a user