Add rendering engine
This commit is contained in:
@@ -55,7 +55,7 @@ void basic_allocation_traits<VkBuffer>::destroy(
|
||||
vmaDestroyBuffer(allocator, buffer.release(), allocation);
|
||||
}
|
||||
|
||||
void * basic_allocation_traits<VkBuffer>::map(VmaAllocation allocation)
|
||||
void * basic_allocation_traits_base::map(VmaAllocation allocation)
|
||||
{
|
||||
VmaAllocator allocator = application::get_allocator();
|
||||
|
||||
@@ -64,6 +64,13 @@ void * basic_allocation_traits<VkBuffer>::map(VmaAllocation allocation)
|
||||
return mapped;
|
||||
}
|
||||
|
||||
void basic_allocation_traits_base::unmap(VmaAllocation allocation)
|
||||
{
|
||||
VmaAllocator allocator = application::get_allocator();
|
||||
|
||||
vmaUnmapMemory(allocator, allocation);
|
||||
}
|
||||
|
||||
std::pair<vk::raii::Image, VmaAllocation> basic_allocation_traits<VkImage>::create(
|
||||
const CreateInfo& image_info,
|
||||
const VmaAllocationCreateInfo* alloc_info)
|
||||
@@ -90,12 +97,3 @@ void basic_allocation_traits<VkImage>::destroy(
|
||||
|
||||
vmaDestroyImage(allocator, image.release(), allocation);
|
||||
}
|
||||
|
||||
void * basic_allocation_traits<VkImage>::map(VmaAllocation allocation)
|
||||
{
|
||||
VmaAllocator allocator = application::get_allocator();
|
||||
|
||||
void * mapped;
|
||||
CHECK_VK(vmaMapMemory(allocator, allocation, &mapped));
|
||||
return mapped;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user