to set few functions to private in VKPrimitive

This commit is contained in:
2024-04-27 03:09:16 +08:00
parent 21a63f4a9b
commit 6ad3b9edb7
10 changed files with 137 additions and 75 deletions

View File

@@ -4,6 +4,7 @@
#include<hgl/graph/VKRenderable.h>
#include<hgl/graph/VKDeviceAttribute.h>
#include<hgl/graph/VKPhysicalDevice.h>
#include<hgl/graph/VKIndexBuffer.h>
VK_NAMESPACE_BEGIN
RenderCmdBuffer::RenderCmdBuffer(const GPUDeviceAttribute *attr,VkCommandBuffer cb):GPUCmdBuffer(attr,cb)

View File

@@ -2,6 +2,7 @@
#include<hgl/graph/VKBuffer.h>
#include<hgl/graph/VKShaderModule.h>
#include<hgl/graph/VKVertexAttribBuffer.h>
#include<hgl/graph/VKIndexBuffer.h>
#ifdef _DEBUG
#include<hgl/graph/VKDevice.h>
@@ -52,7 +53,7 @@ bool Primitive::SetVAB(const AnsiString &name,VAB *vab,VkDeviceSize start)
return(true);
}
bool Primitive::GetVABAccess(const AnsiString &name,VABAccess *vad)
const bool Primitive::GetVABAccess(const AnsiString &name,VABAccess *vad)
{
if(name.IsEmpty())return(false);
if(!vad)return(false);

View File

@@ -3,6 +3,7 @@
#include<hgl/graph/VKRenderable.h>
#include<hgl/graph/VKInlinePipeline.h>
#include<hgl/graph/VKVertexAttribBuffer.h>
#include<hgl/graph/VKIndexBuffer.h>
VK_NAMESPACE_BEGIN
VAB *RenderResource::CreateVAB(VkFormat format,uint32_t count,const void *data,SharingMode sharing_mode)

View File

@@ -51,7 +51,7 @@ Renderable *CreateRenderable(Primitive *prim,MaterialInstance *mi,Pipeline *p)
const uint32_t input_count=vil->GetCount(VertexInputGroup::Basic); //不统计Bone/LocalToWorld组的
const UTF8String &mtl_name=mi->GetMaterial()->GetName();
if(prim->GetBufferCount()<input_count) //小于材质要求的数量?那自然是不行的
if(prim->GetVACount()<input_count) //小于材质要求的数量?那自然是不行的
{
LOG_ERROR("[FATAL ERROR] input buffer count of Renderable lesser than Material, Material name: "+mtl_name);