Created a buffer object. Use the new pipeline bind_vertex to use for verticies
This commit is contained in:
23
include/vulkan/basalt_buffer.h
Normal file
23
include/vulkan/basalt_buffer.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include "vulkan/basalt_pipeline.h"
|
||||
|
||||
namespace basalt
|
||||
{
|
||||
class Buffer
|
||||
{
|
||||
public:
|
||||
Buffer(basalt::Device& device, u64 num_bytes, VkBufferUsageFlagBits usage_flags,
|
||||
VkMemoryPropertyFlags props= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
|
||||
VkSharingMode sharing_mode = VK_SHARING_MODE_EXCLUSIVE);
|
||||
~Buffer();
|
||||
|
||||
void* map ();
|
||||
void unmap ();
|
||||
|
||||
void* mapped_ptr;
|
||||
VkBuffer buffer;
|
||||
VkDeviceMemory memory;
|
||||
basalt::Device* device;
|
||||
size_t size = 0;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user