Refactoring Samplers

- Add Sampler base class
- Add ColorAttachment, DepthAttachment classes
- Add function name to all traces
- Add Framebuffer resizing
This commit is contained in:
Thraix
2023-02-05 22:13:21 +01:00
parent 88979a5ab9
commit c2e349eb56
26 changed files with 625 additions and 540 deletions
+3 -3
View File
@@ -35,7 +35,7 @@ namespace Copium
allocateInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
allocateInfo.commandPool = instance.GetCommandPool();
allocateInfo.commandBufferCount = commandBuffers.size();
CP_VK_ASSERT(vkAllocateCommandBuffers(instance.GetDevice(), &allocateInfo, commandBuffers.data()), "Failed to allocate CommandBuffer");
CP_VK_ASSERT(vkAllocateCommandBuffers(instance.GetDevice(), &allocateInfo, commandBuffers.data()), "CommandBuffer : Failed to allocate CommandBuffer");
}
~CommandBuffer()
@@ -65,11 +65,11 @@ namespace Copium
currentCommandBuffer = commandBuffers[instance.GetFlightIndex()];
break;
default:
CP_WARN("Unhandled enum case: %d", (int)type);
CP_ABORT("Begin : Unreachable switch case");
}
vkResetCommandBuffer(currentCommandBuffer, 0);
CP_VK_ASSERT(vkBeginCommandBuffer(currentCommandBuffer, &beginInfo), "Failed to begin command buffer");
CP_VK_ASSERT(vkBeginCommandBuffer(currentCommandBuffer, &beginInfo), "Begin : Failed to begin command buffer");
}
void End()