PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
PixelBullet::PipelineGraphics Class Reference

Class that represents a graphics pipeline. More...

#include <PipelineGraphics.hpp>

Inheritance diagram for PixelBullet::PipelineGraphics:
PixelBullet::Pipeline

Public Types

enum class  Mode { Polygon , MRT }
 
enum class  Depth { None = 0 , Read = 1 , Write = 2 , ReadWrite = Read | Write }
 
- Public Types inherited from PixelBullet::Pipeline
using Stage = std::pair<uint32_t, uint32_t>
 

Public Member Functions

 PipelineGraphics (Stage stage, std::vector< VirtualPath > shaderStages, std::vector< Shader::VertexInput > vertexInputs, std::vector< Shader::Define > defines={}, Mode mode=Mode::Polygon, Depth depth=Depth::ReadWrite, VkPrimitiveTopology topology=VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VkPolygonMode polygonMode=VK_POLYGON_MODE_FILL, VkCullModeFlags cullMode=VK_CULL_MODE_BACK_BIT, VkFrontFace frontFace=VK_FRONT_FACE_CLOCKWISE, bool pushDescriptors=false)
 
const ImageDepthGetDepthStencil (const std::optional< uint32_t > &stage=std::nullopt) const
 
const Image2DGetImage (uint32_t index, const std::optional< uint32_t > &stage=std::nullopt) const
 
RenderArea GetRenderArea (const std::optional< uint32_t > &stage=std::nullopt) const
 
const StageGetStage () const
 
const std::vector< VirtualPath > & GetShaderStages () const
 
const std::vector< Shader::VertexInput > & GetVertexInputs () const
 
const std::vector< Shader::Define > & GetDefines () const
 
Mode GetMode () const
 
Depth GetDepth () const
 
VkPrimitiveTopology GetTopology () const
 
VkPolygonMode GetPolygonMode () const
 
VkCullModeFlags GetCullMode () const
 
VkFrontFace GetFrontFace () const
 
bool IsPushDescriptors () const override
 
const ShaderGetShader () const override
 
const VkDescriptorSetLayout & GetDescriptorSetLayout () const override
 
const VkDescriptorPool & GetDescriptorPool () const override
 
const VkPipeline & GetPipeline () const override
 
const VkPipelineLayout & GetPipelineLayout () const override
 
const VkPipelineBindPoint & GetPipelineBindPoint () const override
 
- Public Member Functions inherited from PixelBullet::Pipeline
void BindPipeline (const CommandBuffer &commandBuffer) const
 

Detailed Description

Class that represents a graphics pipeline.

Constructor & Destructor Documentation

◆ PipelineGraphics()

PixelBullet::PipelineGraphics::PipelineGraphics ( Stage stage,
std::vector< VirtualPath > shaderStages,
std::vector< Shader::VertexInput > vertexInputs,
std::vector< Shader::Define > defines = {},
Mode mode = Mode::Polygon,
Depth depth = Depth::ReadWrite,
VkPrimitiveTopology topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,
VkPolygonMode polygonMode = VK_POLYGON_MODE_FILL,
VkCullModeFlags cullMode = VK_CULL_MODE_BACK_BIT,
VkFrontFace frontFace = VK_FRONT_FACE_CLOCKWISE,
bool pushDescriptors = false )

Creates a new pipeline.

Parameters
stageThe graphics stage this pipeline will be run on.
shaderStagesThe source files to load the pipeline shaders from.
vertexInputsThe vertex inputs that will be used as a shaders input.
definesA list of defines added to the top of each shader.
modeThe mode this pipeline will run in.
depthThe depth read/write that will be used.
topologyThe topology of the input assembly.
polygonModeThe polygon draw mode.
cullModeThe vertex cull mode.
frontFaceThe direction to render faces.
pushDescriptorsIf no actual descriptor sets are allocated but instead pushed.

Member Function Documentation

◆ GetDepthStencil()

const ImageDepth * PixelBullet::PipelineGraphics::GetDepthStencil ( const std::optional< uint32_t > & stage = std::nullopt) const

Gets the depth stencil used in a stage.

Parameters
stageThe stage to get values from, if not provided the pipelines stage will be used.
Returns
The depth stencil that is found.

◆ GetDescriptorPool()

const VkDescriptorPool & PixelBullet::PipelineGraphics::GetDescriptorPool ( ) const
inlineoverridevirtual

Implements PixelBullet::Pipeline.

◆ GetDescriptorSetLayout()

const VkDescriptorSetLayout & PixelBullet::PipelineGraphics::GetDescriptorSetLayout ( ) const
inlineoverridevirtual

Implements PixelBullet::Pipeline.

◆ GetImage()

const Image2D * PixelBullet::PipelineGraphics::GetImage ( uint32_t index,
const std::optional< uint32_t > & stage = std::nullopt ) const

Gets a image used in a stage by the index given to it in the renderpass.

Parameters
indexThe renderpass Image index.
stageThe stage to get values from, if not provided the pipelines stage will be used.
Returns
The image that is found.

◆ GetPipeline()

const VkPipeline & PixelBullet::PipelineGraphics::GetPipeline ( ) const
inlineoverridevirtual

Implements PixelBullet::Pipeline.

◆ GetPipelineBindPoint()

const VkPipelineBindPoint & PixelBullet::PipelineGraphics::GetPipelineBindPoint ( ) const
inlineoverridevirtual

Implements PixelBullet::Pipeline.

◆ GetPipelineLayout()

const VkPipelineLayout & PixelBullet::PipelineGraphics::GetPipelineLayout ( ) const
inlineoverridevirtual

Implements PixelBullet::Pipeline.

◆ GetRenderArea()

RenderArea PixelBullet::PipelineGraphics::GetRenderArea ( const std::optional< uint32_t > & stage = std::nullopt) const

Gets the render stage viewport.

Parameters
stageThe stage to get values from, if not provided the pipelines stage will be used.
Returns
The the render stage viewport.

◆ GetShader()

const Shader * PixelBullet::PipelineGraphics::GetShader ( ) const
inlineoverridevirtual

Implements PixelBullet::Pipeline.

◆ IsPushDescriptors()

bool PixelBullet::PipelineGraphics::IsPushDescriptors ( ) const
inlineoverridevirtual

Implements PixelBullet::Pipeline.


The documentation for this class was generated from the following files: