moved GPUArrayBuffer construct function to private scope.
This commit is contained in:
parent
fa26330c42
commit
8f1fc82697
@ -26,9 +26,14 @@ namespace hgl
|
||||
uint8 * buf_cpu;
|
||||
uint32_t * offset; ///<数据偏移地址
|
||||
|
||||
private:
|
||||
|
||||
GPUArrayBuffer(GPUDevice *,const uint32_t s=0,const uint32_t c=0);
|
||||
|
||||
friend class GPUDevice;
|
||||
|
||||
public:
|
||||
|
||||
GPUArrayBuffer(GPUDevice *,const uint32_t s=0,const uint32_t c=0);
|
||||
virtual ~GPUArrayBuffer();
|
||||
|
||||
void Clear(); ///<清空缓冲区
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include<hgl/graph/VKDevice.h>
|
||||
#include<hgl/graph/VKBuffer.h>
|
||||
#include<hgl/graph/VKIndexBuffer.h>
|
||||
#include<hgl/graph/VKVertexAttribBuffer.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
bool GPUDevice::CreateBuffer(GPUBufferData *buf,VkBufferUsageFlags buf_usage,VkDeviceSize size,const void *data,SharingMode sharing_mode)
|
||||
|
@ -17,7 +17,11 @@ VKMemoryAllocator::VKMemoryAllocator(GPUDevice *d,const uint32_t flags)
|
||||
|
||||
VKMemoryAllocator::~VKMemoryAllocator()
|
||||
{
|
||||
SAFE_CLEAR(gpu_buffer);
|
||||
if(gpu_buffer)
|
||||
{
|
||||
gpu_buffer->Unmap();
|
||||
delete gpu_buffer;
|
||||
}
|
||||
}
|
||||
|
||||
bool VKMemoryAllocator::Alloc()
|
||||
|
Loading…
x
Reference in New Issue
Block a user