LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::Rendering::Backends::VulkanShaderModule Class Reference

Implements a Vulkan IShaderModule. More...

#include <vulkan.hpp>

Inherits LiteFX::Rendering::IShaderModule, and LiteFX::Resource< VkShaderModule >.

Classes

class  VulkanShaderModuleImpl
 

Public Member Functions

 VulkanShaderModule (const VulkanDevice &device, const ShaderStage &type, const String &fileName, const String &entryPoint="main")
 Initializes a new Vulkan shader module. More...
 
 VulkanShaderModule (const VulkanDevice &device, const ShaderStage &type, std::istream &stream, const String &name, const String &entryPoint="main")
 Initializes a new Vulkan shader module. More...
 
 VulkanShaderModule (const VulkanShaderModule &) noexcept=delete
 
 VulkanShaderModule (VulkanShaderModule &&) noexcept=delete
 
virtual ~VulkanShaderModule () noexcept
 
virtual const StringfileName () const noexcept override
 Returns the file name of the shader module. More...
 
virtual const StringentryPoint () const noexcept override
 Returns the name of the shader module entry point. More...
 
virtual const ShaderStage & type () const noexcept override
 Returns the type of the shader module. More...
 
virtual const Stringbytecode () const noexcept
 Returns the shader byte code. More...
 
virtual VkPipelineShaderStageCreateInfo shaderStageDefinition () const
 Returns the shader stage creation info for convenience. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IShaderModule
virtual ~IShaderModule () noexcept=default
 
virtual const ShaderStage & type () const noexcept=0
 Returns the type of the shader module. More...
 
virtual const StringfileName () const noexcept=0
 Returns the file name of the shader module. More...
 
virtual const StringentryPoint () const noexcept=0
 Returns the name of the shader module entry point. More...
 
- Public Member Functions inherited from LiteFX::Resource< VkShaderModule >
 Resource (const Resource &)=delete
 
 Resource (Resource &&)=delete
 
virtual ~Resource () noexcept=default
 
const VkShaderModule & handle () const noexcept override
 Returns the resource managed by the class. More...
 
- Public Member Functions inherited from LiteFX::IResource< VkShaderModule >
virtual ~IResource () noexcept=default
 
virtual const VkShaderModule & handle () const noexcept=0
 Returns the resource managed by the class. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LiteFX::Resource< VkShaderModule >
 Resource (const VkShaderModule handle) noexcept
 Initializes the managed resource. More...
 
VkShaderModule & handle () noexcept override
 Returns the resource managed by the class. More...
 
virtual VkShaderModule & handle () noexcept=0
 Returns the resource managed by the class. More...
 

Detailed Description

Implements a Vulkan IShaderModule.

See also
VulkanShaderProgram, VulkanDevice

Constructor & Destructor Documentation

◆ VulkanShaderModule() [1/4]

VulkanShaderModule::VulkanShaderModule ( const VulkanDevice device,
const ShaderStage &  type,
const String fileName,
const String entryPoint = "main" 
)
explicit

Initializes a new Vulkan shader module.

Parameters
deviceThe parent device, this shader module has been created from.
typeThe shader stage, this module is used in.
fileNameThe file name of the module source.
entryPointThe name of the module entry point.

◆ VulkanShaderModule() [2/4]

VulkanShaderModule::VulkanShaderModule ( const VulkanDevice device,
const ShaderStage &  type,
std::istream &  stream,
const String name,
const String entryPoint = "main" 
)
explicit

Initializes a new Vulkan shader module.

Parameters
deviceThe parent device, this shader module has been created from.
typeThe shader stage, this module is used in.
streamThe file stream of the module source.
nameThe file name of the module source.
entryPointThe name of the module entry point.

◆ VulkanShaderModule() [3/4]

LiteFX::Rendering::Backends::VulkanShaderModule::VulkanShaderModule ( const VulkanShaderModule )
deletenoexcept

◆ VulkanShaderModule() [4/4]

LiteFX::Rendering::Backends::VulkanShaderModule::VulkanShaderModule ( VulkanShaderModule &&  )
deletenoexcept

◆ ~VulkanShaderModule()

VulkanShaderModule::~VulkanShaderModule ( )
virtualnoexcept

Member Function Documentation

◆ bytecode()

const String & VulkanShaderModule::bytecode ( ) const
virtualnoexcept

Returns the shader byte code.

Returns
The shader byte code.

◆ entryPoint()

const String & VulkanShaderModule::entryPoint ( ) const
overridevirtualnoexcept

Returns the name of the shader module entry point.

Implements LiteFX::Rendering::IShaderModule.

◆ fileName()

const String & VulkanShaderModule::fileName ( ) const
overridevirtualnoexcept

Returns the file name of the shader module.

Implements LiteFX::Rendering::IShaderModule.

◆ shaderStageDefinition()

VkPipelineShaderStageCreateInfo VulkanShaderModule::shaderStageDefinition ( ) const
virtual

Returns the shader stage creation info for convenience.

Returns
The shader stage creation info for convenience.

◆ type()

const ShaderStage & VulkanShaderModule::type ( ) const
overridevirtualnoexcept

Returns the type of the shader module.

Implements LiteFX::Rendering::IShaderModule.