added VKBufferMap.cpp/.h
This commit is contained in:
27
inc/hgl/graph/VKBufferMap.h
Normal file
27
inc/hgl/graph/VKBufferMap.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include<hgl/graph/VK.h>
|
||||
#include<hgl/graph/VertexAttribDataAccess.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
class VKBufferMap
|
||||
{
|
||||
protected:
|
||||
|
||||
DeviceBuffer *buffer;
|
||||
VkDeviceSize offset;
|
||||
VkDeviceSize size;
|
||||
|
||||
void *map_ptr;
|
||||
|
||||
public:
|
||||
|
||||
VKBufferMap(DeviceBuffer *buf_ptr,VkDeviceSize off,VkDeviceSize s);
|
||||
virtual ~VKBufferMap();
|
||||
|
||||
const bool IsValid()const{ return buffer; }
|
||||
|
||||
void *Map();
|
||||
void Unmap();
|
||||
};//class VKBufferMap
|
||||
VK_NAMESPACE_END
|
Reference in New Issue
Block a user