1.moved IndexBufferData to VK.h from VKPrimitive.h

2.renamed to GetIndexBufferData from GetIndexBuffer of Primitive
This commit is contained in:
HuYingzhuo(hugo/hyzboy) 2023-05-06 19:28:42 +08:00
parent 2336c7cdf1
commit 34b7937ee2
3 changed files with 8 additions and 8 deletions

View File

@ -58,6 +58,12 @@ using VBO=VertexAttribBuffer;
class IndexBuffer; class IndexBuffer;
struct IndexBufferData
{
IndexBuffer *buffer=nullptr;
VkDeviceSize offset=0;
};
class GPUCmdBuffer; class GPUCmdBuffer;
class RenderCmdBuffer; class RenderCmdBuffer;
class TextureCmdBuffer; class TextureCmdBuffer;

View File

@ -7,12 +7,6 @@
#include<hgl/math/Math.h> #include<hgl/math/Math.h>
#include<hgl/graph/AABB.h> #include<hgl/graph/AABB.h>
VK_NAMESPACE_BEGIN VK_NAMESPACE_BEGIN
struct IndexBufferData
{
IndexBuffer *buffer;
VkDeviceSize offset;
};
/** /**
* *
*/ */
@ -78,7 +72,7 @@ public:
VkBuffer GetBuffer (const AnsiString &,VkDeviceSize *); VkBuffer GetBuffer (const AnsiString &,VkDeviceSize *);
const int GetBufferCount ()const {return buffer_list.GetCount();} const int GetBufferCount ()const {return buffer_list.GetCount();}
const IndexBufferData * GetIndexBuffer ()const {return &index_buffer_data;} const IndexBufferData * GetIndexBufferData ()const {return &index_buffer_data;}
};//class Primitive };//class Primitive
VK_NAMESPACE_END VK_NAMESPACE_END
#endif//HGL_GRAPH_VULKAN_PRIMITIVE_INCLUDE #endif//HGL_GRAPH_VULKAN_PRIMITIVE_INCLUDE

View File

@ -56,7 +56,7 @@ Renderable *CreateRenderable(Primitive *prim,MaterialInstance *mi,Pipeline *p)
VBO *vbo; VBO *vbo;
VertexInputData *vid=new VertexInputData(input_count,prim->GetVertexCount(),prim->GetIndexBuffer()); VertexInputData *vid=new VertexInputData(input_count,prim->GetVertexCount(),prim->GetIndexBufferData());
const VertexInputFormat *vif=vil->GetFormatList(VertexInputGroup::Basic); const VertexInputFormat *vif=vil->GetFormatList(VertexInputGroup::Basic);