resource group for loading shader sources that give you back VkShaderModule handles More...
Public Member Functions | |
| shader_resource_group (const VkDevice &p_device, const ::vk::shader_resource_info &p_info) | |
| constructs a new shader_resource_group | |
| bool | valid () const |
| void | vertex_attributes (std::span< const ::vk::vertex_attribute > p_attributes) |
| sets the vertex attributes with the shader modules that gets used by ::vk::pipeline (graphics pipeline) | |
| std::vector<::vk::shader_handle > | handles () const |
| this gives you back the shader module handles along with each of their stages they have been compiled with | |
| std::span< const VkVertexInputAttributeDescription > | vertex_attributes () const |
| std::span< const VkVertexInputBindingDescription > | vertex_bind_attributes () const |
| void | destroy () |
| explicit cleanup to the VkShaderModule handles created with this particular resource group | |
| bool | reload_requested () const |
| ideally used for requesting for reload | |
resource group for loading shader sources that give you back VkShaderModule handles
compiles source code from the shader directly without needing manual recompilation
shaderc requires these parameters to compile text_source_code: the std::string version of the entire source code to compile type: shader stage this shader corresponds to filename: input filename text entry_point: the entry point to this shader options: compiler-specific options to enable when compiling the shader sources
Responsibility is to load stages of shader sources whether that be through precompiler .spv files or through shaderc runtime shader compilation
Responsibility is loading and streaming the amount of bytes from the compiled shader sources into the vulkan shader module handles
resource groups up the creation and management of vulkan shader modules.
|
inline |
constructs a new shader_resource_group
| p_device | is the logical device required to creating the vulkan shader module |
| p_info | has the properties such as specified shader sources to load/compile |
|
inline |
this gives you back the shader module handles along with each of their stages they have been compiled with
Returns the vector to retain the shader modules that are needed by the graphics pipeline.
It is required by vulkan specs the graphics pipeline to contain valid shader modules of the compiled shaders
|
inline |
ideally used for requesting for reload
Planning to use this for invalidation when for runtime shader hot-reloading
|
inline |
|
inline |
|
inline |
sets the vertex attributes with the shader modules that gets used by ::vk::pipeline (graphics pipeline)
| p_attributes | is the high-level specifications for setting up vertex attributes that correspond with these shaders |
|
inline |