Files
Copium/CopiumEngine/src/copium/renderer/DrawCall.cpp
T
Thraix 4fe719858d Add ShaderReflector
- Used to look at the shader files and find set/binding automatically
2023-03-14 22:56:11 +01:00

26 lines
676 B
C++

#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.SetSamplers(samplers, 0);
}
RendererVertexBuffer& DrawCall::GetVertexBuffer()
{
return vertexBuffer;
}
DescriptorSet& DrawCall::GetDescriptorSet()
{
return descriptorSet;
}
}