Manages all active shaders in a VulkanSession.
More...
Manages all active shaders in a VulkanSession.
Definition at line 88 of file VulkanShader.h.
◆ ShaderType
The types of shaders available for rendering different primitives.
| Enumerator |
|---|
| e_simple_points | Simplified point rendering shader.
|
| e_points | Full point rendering shader.
|
| e_linework | Line rendering shader.
|
| e_solid | Solid surface rendering shader.
|
| e_solid_grid | Solid surface with grid overlay shader.
|
| e_solid_texture | Solid surface with texture mapping shader.
|
| e_tbn_texture | Tangent-bitangent-normal texture mapping shader.
|
| e_shader_type_size | The number of shader types (sentinel).
|
| e_all | Represents all shader types.
|
Definition at line 94 of file VulkanShader.h.
◆ VulkanShaderManager()
Constructs a shader manager for the given device.
- Parameters
-
| [in] | device | The Vulkan device. |
◆ addShader() [1/2]
Adds a shader from raw bytecode.
- Parameters
-
| [in] | name | The shader set name. |
| [in] | type | The shader type. |
| [in] | data | The SPIR-V bytecode. |
◆ addShader() [2/2]
Adds a shader from a file.
- Parameters
-
| [in] | name | The shader set name. |
| [in] | type | The shader type. |
| [in] | file | The SPIR-V file. |
◆ ensureCreated() [1/2]
| void VulkanShaderManager::ensureCreated |
( |
const StringView & | name | ) |
|
Ensures all shader types for the named shader set are created.
- Parameters
-
| [in] | name | The shader set name. |
◆ ensureCreated() [2/2]
Ensures a specific shader type for the named shader set is created.
- Parameters
-
| [in] | type | The shader type. |
| [in] | name | The shader set name. |
◆ getShader()
Retrieves a shader of the given type from the named set.
- Parameters
-
| [in] | file | The shader set name. |
| [in] | type | The shader type. |
- Returns
- A const pointer to the shader.
◆ setInstance()
Sets the Vulkan device for all managed shaders.
- Parameters
-
| [in] | device | The Vulkan device. |
The documentation for this class was generated from the following file: