Vulkan implementation of a IShaderModule.
More...
#include <VulkanShaderModule.h>
|
using | handle_type |
|
VkShaderModule & | handle () final |
| Gets the managed resource handle.
|
|
Vulkan implementation of a IShaderModule.
◆ VulkanShaderModule() [1/2]
spark::render::vk::VulkanShaderModule::VulkanShaderModule |
( |
const VulkanDevice & | device, |
|
|
ShaderStage | type, |
|
|
const std::filesystem::path & | file_name, |
|
|
const std::string & | entry_point = "main" ) |
|
explicit |
Initializes a new VulkanShaderModule from a file.
- Parameters
-
device | The parent VulkanDevice this shader has been created from. |
type | The ShaderStage of this shader. |
file_name | The path to the shader file. |
entry_point | The name of the entry point of the shader. |
- Exceptions
-
◆ VulkanShaderModule() [2/2]
spark::render::vk::VulkanShaderModule::VulkanShaderModule |
( |
const VulkanDevice & | device, |
|
|
ShaderStage | type, |
|
|
std::istream & | stream, |
|
|
const std::string & | name, |
|
|
const std::string & | entry_point = "main" ) |
|
explicit |
Initializes a new VulkanShaderModule from a std::istream.
- Parameters
-
device | The parent VulkanDevice this shader has been created from. |
type | The ShaderStage of this shader. |
stream | The std::istream containing the shader byte code. |
name | The file name of the shader. |
entry_point | The name of the entry point of the shader. |
- Exceptions
-
◆ byteCode()
const std::string & spark::render::vk::VulkanShaderModule::byteCode |
( |
| ) |
const |
|
nodiscardnoexcept |
Gets the shader byte code.
- Returns
- A std::string containing the shader byte code.
◆ entryPoint()
const std::string & spark::render::vk::VulkanShaderModule::entryPoint |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Gets the entry point of this shader.
- Returns
- A std::string containing the name of the entry point of this shader.
Implements spark::render::IShaderModule.
◆ fileName()
const std::string & spark::render::vk::VulkanShaderModule::fileName |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Gets the name of the file this shader was loaded from.
- Returns
- A std::string containing the name of the file this shader was loaded from.
Implements spark::render::IShaderModule.
◆ stage()
ShaderStage spark::render::vk::VulkanShaderModule::stage |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Gets the type of the shader.
- Returns
- A ShaderStage representing the stage of the pipeline this shader is used in.
Implements spark::render::IShaderModule.