#include "RenderPipeline.hpp"

void TSE::RenderPipeline::AddRenderStep(const RenderStep &step)
{
    steps.push_back(step);
}

void TSE::RenderPipeline::AddRenderStepAt(const RenderStep &step, int n)
{
    steps.insert(steps.begin() + n, step);
}

void TSE::RenderPipeline::SetRenderStepAt(const RenderStep &step, int n)
{
    steps[n] = step;
}

void TSE::RenderPipeline::RemoveRenderStepAt(int n)
{
    auto i = steps.begin() += n;
    steps.erase(i);
}

int TSE::RenderPipeline::GetRenderStepCount()
{
    return steps.size();
}

const TSE::RenderStep &TSE::RenderPipeline::GetRenderStepAt(int n)
{
    return steps[n];
}

TSE::RenderPipeline* TSE::RenderPipeline::CreateEmpty()
{
    RenderPipeline* res = new RenderPipeline();
    RenderStep step;
    res->AddRenderStep(step);
    return res;
}
