added VKPrimitiveData.h

This commit is contained in:
2024-04-26 01:17:47 +08:00
parent 5391f0f4aa
commit 6dba761a80
4 changed files with 36 additions and 32 deletions

View File

@@ -1,27 +1,11 @@
#ifndef HGL_GRAPH_VULKAN_PRIMITIVE_INCLUDE
#define HGL_GRAPH_VULKAN_PRIMITIVE_INCLUDE
#include<hgl/graph/VKIndexBuffer.h>
#include<hgl/type/Map.h>
#include<hgl/type/String.h>
#include<hgl/math/Math.h>
#include<hgl/graph/AABB.h>
#include<hgl/graph/VKVertexAttribBuffer.h>
#include<hgl/graph/VKPrimitiveData.h>
VK_NAMESPACE_BEGIN
struct PrimitiveData
{
uint32_t vertex_count;
uint32_t va_count;
VABAccess *vab_list;
IndexBufferAccess ib_access;
AABB BoundingBox;
};
/**
* 单一图元数据
*/
@@ -44,11 +28,6 @@ protected:
friend class RenderableNode;
uint ref_count=0;
uint RefInc(){return ++ref_count;}
uint RefDec(){return --ref_count;}
public:
Primitive(GPUDevice *dev,const AnsiString &n,const uint32_t vc=0)
@@ -60,8 +39,6 @@ public:
virtual ~Primitive()=default;
const uint GetRefCount()const{return ref_count;}
void SetBoundingBox(const AABB &aabb){BoundingBox=aabb;}
const AABB & GetBoundingBox()const {return BoundingBox;}

View File

@@ -0,0 +1,22 @@
#pragma once
#include<hgl/graph/VKVertexAttribBuffer.h>
#include<hgl/graph/VKIndexBuffer.h>
#include<hgl/graph/AABB.h>
VK_NAMESPACE_BEGIN
struct PrimitiveData
{
uint32_t vertex_count;
uint32_t va_count;
VABAccess *vab_list;
IndexBufferAccess ib_access;
AABB BoundingBox;
};
VK_NAMESPACE_END