vengine  0.1.0
3D graphics engine made with Vulkan
Loading...
Searching...
No Matches
ven::Shaders Class Reference

#include <Shaders.hpp>

+ Collaboration diagram for ven::Shaders:

Public Member Functions

 Shaders (Device &device, const std::string &vertFilepath, const std::string &fragFilepath, const PipelineConfigInfo &configInfo)
 
 ~Shaders ()
 
 Shaders (const Shaders &)=delete
 
Shadersoperator= (const Shaders &)=delete
 
void bind (const VkCommandBuffer commandBuffer) const
 

Static Public Member Functions

static void defaultPipelineConfigInfo (PipelineConfigInfo &configInfo)
 

Private Member Functions

void createGraphicsPipeline (const std::string &vertFilepath, const std::string &fragFilepath, const PipelineConfigInfo &configInfo)
 
void createShaderModule (const std::vector< char > &code, VkShaderModule *shaderModule) const
 

Static Private Member Functions

static std::vector< char > readFile (const std::string &filename)
 

Private Attributes

Devicem_device
 
VkPipeline m_graphicsPipeline {nullptr}
 
VkShaderModule m_vertShaderModule {nullptr}
 
VkShaderModule m_fragShaderModule {nullptr}
 

Detailed Description

Definition at line 39 of file Shaders.hpp.

Constructor & Destructor Documentation

◆ Shaders() [1/2]

ven::Shaders::Shaders ( Device & device,
const std::string & vertFilepath,
const std::string & fragFilepath,
const PipelineConfigInfo & configInfo )
inline

Definition at line 43 of file Shaders.hpp.

References createGraphicsPipeline().

+ Here is the call graph for this function:

◆ ~Shaders()

ven::Shaders::~Shaders ( )

Definition at line 6 of file shaders.cpp.

References ven::Device::device(), m_device, m_fragShaderModule, m_graphicsPipeline, and m_vertShaderModule.

+ Here is the call graph for this function:

◆ Shaders() [2/2]

ven::Shaders::Shaders ( const Shaders & )
delete

Member Function Documentation

◆ bind()

void ven::Shaders::bind ( const VkCommandBuffer commandBuffer) const
inline

Definition at line 50 of file Shaders.hpp.

References m_graphicsPipeline.

◆ createGraphicsPipeline()

◆ createShaderModule()

void ven::Shaders::createShaderModule ( const std::vector< char > & code,
VkShaderModule * shaderModule ) const
private

Definition at line 100 of file shaders.cpp.

◆ defaultPipelineConfigInfo()

◆ operator=()

Shaders & ven::Shaders::operator= ( const Shaders & )
delete

◆ readFile()

std::vector< char > ven::Shaders::readFile ( const std::string & filename)
staticprivate

Definition at line 13 of file shaders.cpp.

Member Data Documentation

◆ m_device

Device& ven::Shaders::m_device
private

Definition at line 58 of file Shaders.hpp.

Referenced by ~Shaders().

◆ m_fragShaderModule

VkShaderModule ven::Shaders::m_fragShaderModule {nullptr}
private

Definition at line 61 of file Shaders.hpp.

Referenced by ~Shaders().

◆ m_graphicsPipeline

VkPipeline ven::Shaders::m_graphicsPipeline {nullptr}
private

Definition at line 59 of file Shaders.hpp.

Referenced by bind(), and ~Shaders().

◆ m_vertShaderModule

VkShaderModule ven::Shaders::m_vertShaderModule {nullptr}
private

Definition at line 60 of file Shaders.hpp.

Referenced by ~Shaders().


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