3#include "spark/render/Export.h"
4#include "spark/render/InputAssembler.h"
5#include "spark/render/Pipeline.h"
6#include "spark/render/Rasterizer.h"
10namespace spark::render
24 [[nodiscard]] std::shared_ptr<IInputAssembler>
inputAssembler() const noexcept {
return genericInputAssembler(); }
30 [[nodiscard]] std::shared_ptr<IRasterizer>
rasterizer() const noexcept {
return genericRasterizer(); }
45 [[nodiscard]] virtual std::shared_ptr<
IInputAssembler> genericInputAssembler() const noexcept = 0;
46 [[nodiscard]] virtual std::shared_ptr<
IRasterizer> genericRasterizer() const noexcept = 0;
55 template <typename PipelineLayoutType, typename ShaderProgramType, typename InputAssemblerType, typename RasterizerType>
59 using input_assembler_type = InputAssemblerType;
60 using rasterizer_type = RasterizerType;
64 [[nodiscard]]
virtual std::shared_ptr<input_assembler_type>
inputAssembler() const noexcept = 0;
67 [[nodiscard]] virtual std::shared_ptr<rasterizer_type> rasterizer() const noexcept = 0;
70 [[nodiscard]] std::shared_ptr<
IInputAssembler> genericInputAssembler() const noexcept final {
return inputAssembler(); }
71 [[nodiscard]] std::shared_ptr<IRasterizer> genericRasterizer() const noexcept final {
return rasterizer(); }
Interface representing a pipeline.
Definition Pipeline.h:82
Represents the rasterizer stage of the graphics pipeline.
Definition Rasterizer.h:63
Interface for a render pipeline.
Definition RenderPipeilne.h:16
std::shared_ptr< IRasterizer > rasterizer() const noexcept
Gets the rasterizer state used by the render pipeline.
Definition RenderPipeilne.h:30
virtual bool alphaToCoverage() const noexcept=0
Checks if the render pipeline is using alpha to coverage.
std::shared_ptr< IInputAssembler > inputAssembler() const noexcept
Gets the input assembler state used by the render pipeline.
Definition RenderPipeilne.h:24
Represents a pipeline state.
Definition Pipeline.h:113
Represents a graphics IPipeline.
Definition RenderPipeilne.h:57
virtual std::shared_ptr< input_assembler_type > inputAssembler() const noexcept=0
Gets the input assembler state used by the render pipeline.
Base class for a resource that can be identified by a name in a DeviceState.
Definition StateResource.h:29