Files
Copium/CopiumEngine/src/copium/renderer/Batch.cpp
T
2023-04-04 21:14:01 +02:00

25 lines
606 B
C++

#include "copium/renderer/Batch.h"
#include "copium/renderer/RendererVertex.h"
namespace Copium
{
Batch::Batch(Pipeline& pipeline, DescriptorPool& descriptorPool, int vertexCount, const std::vector<const Sampler*> samplers)
: pipeline{pipeline},
vertexBuffer{RendererVertex::GetDescriptor(), vertexCount},
descriptorSet{pipeline.CreateDescriptorSet(descriptorPool, 0)}
{
descriptorSet->SetSamplers(samplers, 0);
}
RendererVertexBuffer& Batch::GetVertexBuffer()
{
return vertexBuffer;
}
DescriptorSet& Batch::GetDescriptorSet()
{
return *descriptorSet;
}
}