Skip to content

LiteFX::Rendering::ShaderProgram

Represents a shader program, consisting of multiple IShaderModule "IShaderModules".

Synopsis

Declared in <litefx/rendering.hpp>

template<typename TShaderModule>
requires meta::implements<TShaderModule, IShaderModule>
class ShaderProgram
    : public IShaderProgram

Base Classes

NameDescription
IShaderProgramThe interface for a shader program.

Type Aliases

Member Functions

NameDescription
~ShaderProgram [destructor] [virtual]Destructor
operator= Assignment operators
buildShaderRecordCollection Builds a shader record collection based on the current shader program.
contains contains overloads
modules [virtual]Returns the modules, the shader program is build from.
operator[] Returns a pointer to shader module based on its (case-sensitive) name.
reflectPipelineLayout Uses shader reflection to extract the pipeline layout of a shader. May not be available in all backends.
shared_from_this Returns a shared pointer to the current object instance.
weak_from_this Returns a weak pointer to the current object instance.

Protected Types

NameDescription
Allocator An allocator used to allocate the shared object.

Protected Member Functions

NameDescription
ShaderProgram [constructor]Constructors
operator= Assignment operators

Protected Static Member Functions

NameDescription
create Generic factory method used to create instances of the shared object.

Template Parameters

NameDescription
TShaderModuleThe type of the shader module. Must implement IShaderModule.

Derived Classes

NameDescription
DirectX12ShaderProgram Implements a DirectX 12 ShaderProgram.
VulkanShaderProgram Implements a Vulkan ShaderProgram.

See Also

https://github.com/crud89/LiteFX/wiki/Shader-Development