add DescriptorSets at RenderableInstance class. and renamed RenderableInstance::GetMIDescSets instead of GetDescriptorSets.
This commit is contained in:
@@ -184,7 +184,7 @@ public:
|
||||
cb->SetClearColor(0,clear_color.r,clear_color.g,clear_color.b);
|
||||
cb->BeginRenderPass();
|
||||
cb->BindPipeline(ri->GetPipeline());
|
||||
cb->BindDescriptorSets(ri->GetDescriptorSets());
|
||||
cb->BindDescriptorSets(ri->GetMIDescSets());
|
||||
cb->BindVAB(ri);
|
||||
|
||||
if (ib)
|
||||
|
@@ -16,6 +16,8 @@ class RenderableInstance
|
||||
MaterialInstance * mat_inst;
|
||||
Renderable * render_obj;
|
||||
|
||||
DescriptorSets * descriptor_sets; ///<渲染实例专用描述符合集,一般用于存LocalToWorld等等
|
||||
|
||||
uint32_t buffer_count;
|
||||
VkBuffer * buffer_list;
|
||||
VkDeviceSize * buffer_size;
|
||||
@@ -42,7 +44,8 @@ public:
|
||||
const uint32_t GetIndexBufferOffset()const{return render_obj->GetIndexBufferOffset();}
|
||||
const uint32_t GetDrawCount ()const{return render_obj->GetDrawCount();}
|
||||
|
||||
DescriptorSets * GetDescriptorSets ()const{return mat_inst->GetDescriptorSets();}
|
||||
DescriptorSets * GetMIDescSets ()const{return mat_inst->GetDescriptorSets();}
|
||||
DescriptorSets * GetRIDescSets ()const{return descriptor_sets;}
|
||||
|
||||
public:
|
||||
|
||||
|
2
res
2
res
Submodule res updated: bab8e14717...45e1523727
@@ -10,6 +10,8 @@ RenderableInstance::RenderableInstance(Renderable *r,MaterialInstance *mi,Pipeli
|
||||
mat_inst=mi;
|
||||
pipeline=p;
|
||||
|
||||
descriptor_sets=nullptr;
|
||||
|
||||
buffer_count=count;
|
||||
buffer_list=bl;
|
||||
buffer_size=bs;
|
||||
@@ -17,6 +19,7 @@ RenderableInstance::RenderableInstance(Renderable *r,MaterialInstance *mi,Pipeli
|
||||
|
||||
RenderableInstance::~RenderableInstance()
|
||||
{
|
||||
SAFE_CLEAR(descriptor_sets);
|
||||
//需要在这里添加删除pipeline/desc_sets/render_obj引用计数的代码
|
||||
|
||||
delete[] buffer_list;
|
||||
|
Reference in New Issue
Block a user