Kale
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | List of all members
Kale::Vulkan::GraphicsPipeline Class Reference

#include <GraphicsPipeline.hpp>

+ Inheritance diagram for Kale::Vulkan::GraphicsPipeline:

Public Member Functions

 GraphicsPipeline ()
 
 GraphicsPipeline (const std::string &vert, const std::string &frag, const Renderer &renderer)
 
void init (const std::string &vert, const std::string &frag, const Renderer &renderer)
 
void freeResources (bool remove=true) override
 

Public Attributes

vk::UniquePipeline pipeline
 
vk::UniquePipelineLayout layout
 

Private Member Functions

void createPipelineLayout ()
 

Additional Inherited Members

- Protected Member Functions inherited from Kale::Vulkan::ChildResource< SwapChain >
 ChildResource ()
 
 ChildResource (SwapChain &parent)
 
virtual void init (SwapChain &parent)
 
 ~ChildResource ()
 
- Protected Attributes inherited from Kale::Vulkan::ChildResource< SwapChain >
SwapChainparentPtr
 

Detailed Description

Represents the vulkan graphics pipeline

Definition at line 34 of file GraphicsPipeline.hpp.

Constructor & Destructor Documentation

◆ GraphicsPipeline() [1/2]

GraphicsPipeline::GraphicsPipeline ( )

Creates an uninitialized graphics pipeline

Definition at line 34 of file GraphicsPipeline.cpp.

◆ GraphicsPipeline() [2/2]

GraphicsPipeline::GraphicsPipeline ( const std::string & vert,
const std::string & frag,
const Renderer & renderer )

Creates the graphics pipeline given the required shaders

Parameters
vertThe filename of the vertex shader (the assets/shaders/ path is prepended automatically)
fragThe filename of the fragment shader (the assets/shaders/ path is prepended automatically)
rendererThe renderer this graphics pipeline will render to

Sets up the graphics pipeline

Parameters
vertThe vertex shader filename (the assets/shaders/ path is prepended automatically)
fragThe fragment shader filename (the assets/shaders/ path is prepended automatically)
rendererThe renderer this graphics pipeline will render to

Definition at line 44 of file GraphicsPipeline.cpp.

Member Function Documentation

◆ createPipelineLayout()

void GraphicsPipeline::createPipelineLayout ( )
private

Creates the pipeline layout

Definition at line 51 of file GraphicsPipeline.cpp.

◆ freeResources()

void GraphicsPipeline::freeResources ( bool remove = true)
overridevirtual

Frees resources if not already freed

Reimplemented from Kale::Vulkan::ChildResource< SwapChain >.

Definition at line 129 of file GraphicsPipeline.cpp.

◆ init()

void GraphicsPipeline::init ( const std::string & vert,
const std::string & frag,
const Renderer & renderer )

Sets up the graphics pipeline

Parameters
vertThe vertex shader filename (the assets/shaders/ path is prepended automatically)
fragThe fragment shader filename (the assets/shaders/ path is prepended automatically)
rendererThe renderer this graphics pipeline will render to

Definition at line 62 of file GraphicsPipeline.cpp.

Member Data Documentation

◆ layout

vk::UniquePipelineLayout Kale::Vulkan::GraphicsPipeline::layout

The pipeline layout

Definition at line 52 of file GraphicsPipeline.hpp.

◆ pipeline

vk::UniquePipeline Kale::Vulkan::GraphicsPipeline::pipeline

The graphics pipeline

Definition at line 47 of file GraphicsPipeline.hpp.


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