Class GraphicsStage

Inheritance Relationships

Base Type

Class Documentation

class inexor::vulkan_renderer::GraphicsStage : public inexor::vulkan_renderer::RenderStage

Public Functions

inline explicit GraphicsStage(std::string &&name)
GraphicsStage(const GraphicsStage&) = delete
GraphicsStage(GraphicsStage&&) = delete
~GraphicsStage() override = default
GraphicsStage &operator=(const GraphicsStage&) = delete
GraphicsStage &operator=(GraphicsStage&&) = delete
inline void set_clears_screen(bool clears_screen)

Specifies that this stage should clear the screen before rendering.

inline void set_depth_options(bool depth_test, bool depth_write)

Specifies the depth options for this stage.

Parameters
  • depth_test – Whether depth testing should be performed

  • depth_write – Whether depth writing should be performed

inline void set_blend_attachment(VkPipelineColorBlendAttachmentState blend_attachment)

Set the blend attachment for this stage.

Parameters

blend_attachment – The blend attachment

void bind_buffer(const BufferResource *buffer, std::uint32_t binding)

Specifies that buffer should map to binding in the shaders of this stage.

void uses_shader(const wrapper::Shader &shader)

Specifies that shader should be used during the pipeline of this stage.

Note

Binding two shaders of same type (e.g. two vertex shaders) is undefined behaviour.

Private Members

friend RenderGraph
bool m_clears_screen = {false}
bool m_depth_test = {false}
bool m_depth_write = {false}
VkPipelineColorBlendAttachmentState m_blend_attachment = {}
std::unordered_map<const BufferResource*, std::uint32_t> m_buffer_bindings
std::vector<VkPipelineShaderStageCreateInfo> m_shaders