fix: alot of stuff changed. Mostly bugfixxes / architechture changes

This commit is contained in:
2026-08-09 02:24:17 +02:00
parent 4b6f773c0c
commit 05384debbf
98 changed files with 5461 additions and 1751 deletions
+16 -4
View File
@@ -5,19 +5,31 @@
#include <fstream>
#include <iostream>
#include "volk.h"
#include "destrum/Graphics/Util.h"
#include "spdlog/spdlog.h"
Pipeline::Pipeline(GfxDevice& device, const std::string& vertPath, const std::string& fragPath,
const PipelineConfigInfo& configInfo): m_device(device) {
CreateGraphicsPipeline(vertPath, fragPath, configInfo);
try {
CreateGraphicsPipeline(vertPath, fragPath, configInfo);
} catch (...) {
if (m_device.getDevice() != VK_NULL_HANDLE) {
vkDestroyShaderModule(m_device.getDevice(), m_vertShaderModule, nullptr);
vkDestroyShaderModule(m_device.getDevice(), m_fragShaderModule, nullptr);
vkDestroyPipeline(m_device.getDevice(), m_graphicsPipeline, nullptr);
}
throw;
}
}
Pipeline::~Pipeline() {
vkDestroyShaderModule(m_device.getDevice(), m_vertShaderModule, nullptr);
vkDestroyShaderModule(m_device.getDevice(), m_fragShaderModule, nullptr);
vkDestroyPipeline(m_device.getDevice(), m_graphicsPipeline, nullptr);
if (m_device.getDevice() != VK_NULL_HANDLE) {
vkDestroyShaderModule(m_device.getDevice(), m_vertShaderModule, nullptr);
vkDestroyShaderModule(m_device.getDevice(), m_fragShaderModule, nullptr);
vkDestroyPipeline(m_device.getDevice(), m_graphicsPipeline, nullptr);
}
}
void Pipeline::bind(VkCommandBuffer buffer) const {