Cleanup Renderer

This commit is contained in:
Thraix
2023-03-08 23:03:30 +01:00
parent 796de92a56
commit 6e463b3560
12 changed files with 218 additions and 94 deletions
@@ -0,0 +1,25 @@
#include "copium/renderer/DrawCall.h"
#include "copium/renderer/RendererVertex.h"
namespace Copium
{
DrawCall::DrawCall(Vulkan& vulkan, Pipeline& pipeline, DescriptorPool& descriptorPool, int vertexCount, const std::vector<const Sampler*> samplers)
: vulkan{vulkan},
pipeline{pipeline},
vertexBuffer{vulkan, RendererVertex::GetDescriptor(), vertexCount},
descriptorSet{vulkan, descriptorPool, pipeline.GetDescriptorSetLayout(0)}
{
descriptorSet.AddSamplers(samplers, 0);
}
RendererVertexBuffer& DrawCall::GetVertexBuffer()
{
return vertexBuffer;
}
DescriptorSet& DrawCall::GetDescriptorSet()
{
return descriptorSet;
}
}