Crafter.Graphics
C++ graphics library using Wayland and Vulkan.
 
Loading...
Searching...
No Matches
Crafter::VulkanShader< path, entrypoint, stage, DescriptorCount, Descriptors > Class Template Referenceexport

Represents a Vulkan shader module with specified configuration. More...

Static Public Member Functions

static void CreateShader ()
 Creates the vulkan shader, this must be called before any use of this shader.
 

Static Public Attributes

static constexpr VkShaderStageFlagBits _stage = stage
 
static constexpr std::array< DescriptorBinding, DescriptorCount > descriptors = Descriptors
 
static constexpr std::uint32_t descriptorCount = DescriptorCount
 
static constexpr StringLiteral _entrypoint = entrypoint
 
static VkShaderModule shader
 

Detailed Description

template<StringLiteral path, StringLiteral entrypoint, VkShaderStageFlagBits stage, std::uint32_t DescriptorCount, const std::array< DescriptorBinding, DescriptorCount > Descriptors>
class Crafter::VulkanShader< path, entrypoint, stage, DescriptorCount, Descriptors >

Represents a Vulkan shader module with specified configuration.

This class template encapsulates a Vulkan shader, parametrized by the shader's source path, entry point, shader stage, and its descriptor bindings.

Template Parameters
pathA compile-time string literal specifying the file path to the shader source or binary.
entrypointA compile-time string literal specifying the entry point function name within the shader.
stageThe Vulkan shader stage flag indicating the shader type (e.g., vertex, fragment).
DescriptorCountThe number of descriptor bindings used by the shader.
DescriptorsAn array of descriptor binding configurations used by the shader.

This class facilitates compile-time specification of shader resources and metadata, allowing for type-safe shader management and potentially more efficient shader pipeline creation. CreateShader must be called before using this shader in a pipeline.


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