Add rendering engine

This commit is contained in:
Guillaume Meunier
2024-01-28 11:33:32 +01:00
parent 814663beae
commit 95d1020559
45 changed files with 4170 additions and 1863 deletions
+8 -10
View File
@@ -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;
}