cleaned up renderer

This commit is contained in:
Jorijn van der Graaf 2026-03-09 20:10:19 +01:00
commit d661c88ee2
58 changed files with 3030 additions and 4722 deletions

View file

@ -18,13 +18,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
module;
#ifdef CRAFTER_GRAPHICS_VULKAN
#ifdef CRAFTER_GRAPHICS_RENDERER_VULKAN
#include "vulkan/vulkan.h"
#endif
export module Crafter.Graphics:DescriptorPoolVulkan;
#ifdef CRAFTER_GRAPHICS_VULKAN
#ifdef CRAFTER_GRAPHICS_RENDERER_VULKAN
import std;
import :VulkanDevice;
import :Device;
import :Types;
import :DescriptorSetLayoutVulkan;
import Crafter.Event;
@ -155,7 +155,7 @@ export namespace Crafter {
public:
void BuildPool(std::span<const VkDescriptorPoolSize> poolSizes, std::span<const VkDescriptorSetLayout> setLayouts) {
if(descriptorPool != VK_NULL_HANDLE) {
vkDestroyDescriptorPool(VulkanDevice::device, descriptorPool, nullptr);
vkDestroyDescriptorPool(Device::device, descriptorPool, nullptr);
}
@ -166,7 +166,7 @@ export namespace Crafter {
.pPoolSizes = poolSizes.data()
};
VulkanDevice::CheckVkResult(vkCreateDescriptorPool(VulkanDevice::device, &descriptorPoolInfo, nullptr, &descriptorPool));
Device::CheckVkResult(vkCreateDescriptorPool(Device::device, &descriptorPoolInfo, nullptr, &descriptorPool));
VkDescriptorSetAllocateInfo allocInfo {
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,
@ -175,7 +175,7 @@ export namespace Crafter {
.pSetLayouts = setLayouts.data(),
};
VulkanDevice::CheckVkResult(vkAllocateDescriptorSets(VulkanDevice::device, &allocInfo, sets.data()));
Device::CheckVkResult(vkAllocateDescriptorSets(Device::device, &allocInfo, sets.data()));
}
};
}