renamed to Renderable from RenderableInstance, renamed to PrimitiveCreater from RenderableCreater

This commit is contained in:
2022-06-24 21:06:38 +08:00
parent 43c60c16e2
commit d8d8d97abd
46 changed files with 178 additions and 178 deletions

View File

@@ -1,7 +1,7 @@
#include<hgl/graph/VKCommandBuffer.h>
#include<hgl/graph/VKRenderPass.h>
#include<hgl/graph/VKFramebuffer.h>
#include<hgl/graph/VKRenderableInstance.h>
#include<hgl/graph/VKRenderable.h>
#include<hgl/graph/VKDeviceAttribute.h>
#include<hgl/graph/VKPhysicalDevice.h>
@@ -101,7 +101,7 @@ bool RenderCmdBuffer::BeginRenderPass()
return(true);
}
bool RenderCmdBuffer::BindDescriptorSets(RenderableInstance *ri)
bool RenderCmdBuffer::BindDescriptorSets(Renderable *ri)
{
if(!ri)return(false);
@@ -145,7 +145,7 @@ bool RenderCmdBuffer::BindDescriptorSets(RenderableInstance *ri)
return(true);
}
bool RenderCmdBuffer::BindVBO(RenderableInstance *ri)
bool RenderCmdBuffer::BindVBO(Renderable *ri)
{
if(!ri)
return(false);

View File

@@ -1,6 +1,6 @@
#include<hgl/graph/VKRenderResource.h>
#include<hgl/graph/VKDevice.h>
#include<hgl/graph/VKRenderableInstance.h>
#include<hgl/graph/VKRenderable.h>
#include<hgl/graph/VKInlinePipeline.h>
#include<hgl/graph/VKVertexAttribBuffer.h>
@@ -84,12 +84,12 @@ Primitive *RenderResource::CreatePrimitive(const uint32_t vertex_count)
return ro;
}
RenderableInstance *RenderResource::CreateRenderableInstance(Primitive *r,MaterialInstance *mi,Pipeline *p)
Renderable *RenderResource::CreateRenderable(Primitive *r,MaterialInstance *mi,Pipeline *p)
{
if(!p||!mi||!r)
return(nullptr);
RenderableInstance *ri=VK_NAMESPACE::CreateRenderableInstance(r,mi,p);
Renderable *ri=VK_NAMESPACE::CreateRenderable(r,mi,p);
if(ri)
Add(ri);

View File

@@ -1,4 +1,4 @@
#include<hgl/graph/VKRenderableInstance.h>
#include<hgl/graph/VKRenderable.h>
#include<hgl/graph/VKMaterialInstance.h>
#include<hgl/graph/VKMaterialParameters.h>
#include<hgl/graph/VKMaterial.h>
@@ -8,7 +8,7 @@
VK_NAMESPACE_BEGIN
using namespace util;
RenderableInstance::RenderableInstance(Primitive *r,MaterialInstance *mi,Pipeline *p,const uint32_t count,VkBuffer *bl,VkDeviceSize *bs)
Renderable::Renderable(Primitive *r,MaterialInstance *mi,Pipeline *p,const uint32_t count,VkBuffer *bl,VkDeviceSize *bs)
{
primitive=r;
pipeline=p;
@@ -24,7 +24,7 @@ RenderableInstance::RenderableInstance(Primitive *r,MaterialInstance *mi,Pipelin
buffer_hash=0;
}
RenderableInstance::~RenderableInstance()
Renderable::~Renderable()
{
//需要在这里添加删除pipeline/desc_sets/primitive引用计数的代码
@@ -32,7 +32,7 @@ RenderableInstance::~RenderableInstance()
delete[] buffer_size;
}
RenderableInstance *CreateRenderableInstance(Primitive *r,MaterialInstance *mi,Pipeline *p)
Renderable *CreateRenderable(Primitive *r,MaterialInstance *mi,Pipeline *p)
{
if(!r||!mi||!p)return(nullptr);
@@ -92,7 +92,7 @@ RenderableInstance *CreateRenderableInstance(Primitive *r,MaterialInstance *mi,P
++attr_list;
}
RenderableInstance *ri=new RenderableInstance(r,mi,p,input_count,buffer_list,buffer_size);
Renderable *ri=new Renderable(r,mi,p,input_count,buffer_list,buffer_size);
buffer_list.Discard();
buffer_size.Discard();
return ri;

View File

@@ -93,7 +93,7 @@ VAB *VertexShaderModule::CreateVAB(const VABConfigInfo *cfg)
attr->offset =0;
bind->binding =i; //binding对应在vkCmdBindVertexBuffer中设置的缓冲区的序列号所以这个数字必须从0开始而且紧密排列。
//在RenderableInstance类中buffer_list必需严格按照本此binding为序列号排列
//在Renderable类中buffer_list必需严格按照本此binding为序列号排列
if(!cfg||!cfg->Get((*si)->name,vac))
{