From 6bdbf8744652c146429b84f7ef9cbcabc671e9eb Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Thu, 4 May 2023 19:10:22 +0800 Subject: [PATCH] PrimitiveCreater supported newly VertexInputLayout --- inc/hgl/graph/PrimitiveCreater.h | 2 +- src/SceneGraph/PrimitiveCreater.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/hgl/graph/PrimitiveCreater.h b/inc/hgl/graph/PrimitiveCreater.h index 24f90ba2..61a7d862 100644 --- a/inc/hgl/graph/PrimitiveCreater.h +++ b/inc/hgl/graph/PrimitiveCreater.h @@ -56,7 +56,7 @@ namespace hgl template T * CreateVADA(const AnsiString &name) ///<创建一个顶点属性缓冲区以及访问器 { - const VkFormat format=vil->GetFormat(name); + const VkFormat format=vil->GetVulkanFormat(name); if(format!=T::GetVulkanFormat()) return(nullptr); diff --git a/src/SceneGraph/PrimitiveCreater.cpp b/src/SceneGraph/PrimitiveCreater.cpp index 5fe30027..0dd359fb 100644 --- a/src/SceneGraph/PrimitiveCreater.cpp +++ b/src/SceneGraph/PrimitiveCreater.cpp @@ -107,7 +107,7 @@ namespace hgl Primitive *PrimitiveCreater::Finish() { - const uint si_count=vil->GetAttrCount(); + const uint si_count=vil->GetCount(); if(ssb_map.GetCount()!=si_count) return(nullptr); @@ -118,7 +118,7 @@ namespace hgl for(uint i=0;ivalue->vbo) - primitive->Set((*sp)->key,(*sp)->value->vbo); + primitive->Set((*sp)->key,(*sp)->value->vbo); else primitive->Set((*sp)->key,db->CreateVBO((*sp)->value->data));