SPARK
0.1.0
A general purpose game engine written in C++.
|
Vulkan implementation of IRenderPipeline. More...
#include <VulkanRenderPipeline.h>
Classes | |
struct | Impl |
Public Member Functions | |
VulkanRenderPipeline (const VulkanRenderPass &render_pass, std::shared_ptr< VulkanShaderProgram > shader_program, std::shared_ptr< VulkanPipelineLayout > layout, std::shared_ptr< VulkanInputAssembler > input_assembler, std::shared_ptr< VulkanRasterizer > rasterizer, bool enable_alpha_to_coverage=false, const std::string &name="") | |
Initializes a new VulkanRenderPipeline. | |
VulkanRenderPipeline (const VulkanRenderPipeline &other)=delete | |
VulkanRenderPipeline (VulkanRenderPipeline &&other) noexcept=delete | |
VulkanRenderPipeline & | operator= (const VulkanRenderPipeline &other)=delete |
VulkanRenderPipeline & | operator= (VulkanRenderPipeline &&other) noexcept=delete |
std::shared_ptr< const VulkanShaderProgram > | program () const noexcept override |
Gets the shader program used by the pipeline. | |
std::shared_ptr< VulkanPipelineLayout > | layout () const noexcept override |
Gets the pipeline layout. | |
bool | alphaToCoverage () const noexcept override |
Checks if the render pipeline is using alpha to coverage. | |
std::shared_ptr< VulkanInputAssembler > | inputAssembler () const noexcept override |
Gets the input assembler state used by the render pipeline. | |
std::shared_ptr< VulkanRasterizer > | rasterizer () const noexcept override |
Gets the rasterizer state used by the render pipeline. | |
void | use (const VulkanCommandBuffer &command_buffer) const noexcept override |
Sets the current pipeline state on the ICommandBuffer. | |
void | bind (const VulkanCommandBuffer &command_buffer, const VulkanDescriptorSet &descriptor_set) const noexcept override |
Binds a descriptor set on a ICommandBuffer. | |
![]() | |
std::shared_ptr< IInputAssembler > | inputAssembler () const noexcept |
Gets the input assembler state used by the render pipeline. | |
std::shared_ptr< IRasterizer > | rasterizer () const noexcept |
Gets the rasterizer state used by the render pipeline. | |
![]() | |
std::shared_ptr< const IShaderProgram > | program () const noexcept |
Gets the shader program used by the pipeline. | |
std::shared_ptr< IPipelineLayout > | layout () const noexcept |
Gets the pipeline layout. | |
![]() | |
StateResource (std::string_view name) noexcept | |
Initializes a new StateResource instance. | |
StateResource (const StateResource &other)=delete | |
StateResource (StateResource &&other) noexcept | |
StateResource & | operator= (const StateResource &other)=delete |
StateResource & | operator= (StateResource &&other) noexcept |
const std::string & | name () const noexcept final |
Gets the name of the state resource. | |
![]() | |
Resource (Handle handle) noexcept | |
Initializes the managed resource with the given handle. | |
Resource (const Resource &other)=delete | |
Resource (Resource &&other) noexcept=delete | |
![]() | |
Resource (VkPipeline handle) noexcept | |
Initializes the managed resource with the given handle. | |
Resource (const Resource &other)=delete | |
Resource (Resource &&other) noexcept=delete | |
Resource & | operator= (const Resource &other)=delete |
Resource & | operator= (Resource &&other) noexcept=delete |
const VkPipeline & | handle () const final |
Gets the managed resource handle. | |
Additional Inherited Members | |
![]() | |
using | input_assembler_type |
using | rasterizer_type |
![]() | |
using | shader_program_type |
using | pipeline_layout_type |
![]() | |
using | handle_type |
![]() | |
StateResource () noexcept | |
Initializes a new StateResource instance with an empty name. | |
std::string & | name () noexcept |
Gets the name of the state resource. | |
![]() | |
VkPipeline & | handle () final |
Gets the managed resource handle. | |
Vulkan implementation of IRenderPipeline.
|
explicit |
Initializes a new VulkanRenderPipeline.
render_pass | The parent VulkanRenderPass. |
shader_program | The VulkanShaderProgram used by this pipeline. |
layout | The VulkanPipelineLayout of the pipeline. |
input_assembler | The VulkanInputAssembler of the pipeline. |
rasterizer | The VulkanRasterizer of the pipeline. |
name | The optional name of the render pipeline. |
enable_alpha_to_coverage | true if alpha to coverage multisampling should be enabled, false otherwise. |
|
nodiscardoverridevirtualnoexcept |
Checks if the render pipeline is using alpha to coverage.
true
if the render pipeline is using alpha to coverage, false
otherwise.Alpha-to-Coverage is a multi-sampling technique used for partially transparent sprites or textures (such as foliage) to prevent visible flickering along edges. If enabled, the alpha-channel of the first (non-depth/stencil) render target is used to generate a temporary coverage mask that is combined with the fragment coverage mask using a logical AND
.
Implements spark::render::IRenderPipeline.
|
overridevirtualnoexcept |
Binds a descriptor set on a ICommandBuffer.
command_buffer | The ICommandBuffer to issue the bind command on. |
descriptor_set | The IDescriptorSet to bind. |
Implements spark::render::vk::VulkanPipelineState.
|
nodiscardoverridevirtualnoexcept |
Gets the input assembler state used by the render pipeline.
|
nodiscardoverridevirtualnoexcept |
Gets the pipeline layout.
Implements spark::render::Pipeline< VulkanPipelineLayout, VulkanShaderProgram >.
|
nodiscardoverridevirtualnoexcept |
Gets the shader program used by the pipeline.
Implements spark::render::Pipeline< VulkanPipelineLayout, VulkanShaderProgram >.
|
nodiscardoverridevirtualnoexcept |
Gets the rasterizer state used by the render pipeline.
|
overridevirtualnoexcept |
Sets the current pipeline state on the ICommandBuffer.
command_buffer | The ICommandBuffer to set the current pipeline state on. |
Implements spark::render::vk::VulkanPipelineState.