add VKMemoryAllocator.h/.cpp in CMakeLists.txt
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include<hgl/graph/VKBuffer.h>
|
||||
#include<hgl/graph/VKDevice.h>
|
||||
#include<hgl/type/Collection.h>
|
||||
namespace hgl
|
||||
{
|
||||
namespace graph
|
||||
@@ -11,24 +12,20 @@ namespace hgl
|
||||
* GPU数据阵列缓冲区<br>
|
||||
* 它用于储存多份相同格式的数据,常用于多物件渲染,instance等
|
||||
*/
|
||||
class GPUArrayBuffer
|
||||
template<typename T> class GPUArrayBuffer
|
||||
{
|
||||
protected:
|
||||
|
||||
GPUDevice * device;
|
||||
|
||||
uint32_t item_size; ///<单个数据长度
|
||||
uint32_t alloc_count; ///<总计分配的数据个数
|
||||
uint32_t count; ///<实际使用的数据个数
|
||||
uint32_t total_bytes; ///<总字节数
|
||||
|
||||
GPUBuffer * buf_gpu; ///<实际数据GPU缓冲区
|
||||
uint8 * buf_cpu;
|
||||
uint32_t * offset; ///<数据偏移地址
|
||||
Collection<T> *coll;
|
||||
|
||||
private:
|
||||
|
||||
GPUArrayBuffer(GPUDevice *,const uint32_t s=0,const uint32_t c=0);
|
||||
GPUArrayBuffer(GPUDevice *device,const uint32_t s,const uint32_t c)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
friend class GPUDevice;
|
||||
|
||||
|
Reference in New Issue
Block a user