Skip to main content

UniformMappingsComponent Struct Template

Stores uniform names indexed by UniformSemantics. More...

Declaration

template <typename TOwnerHandle, typename TUniformScope> struct helios::engine::rendering::shader::components::UniformMappingsComponent<TOwnerHandle, TUniformScope> { ... }

Public Constructors Index

template <typename ... TMappings>
UniformMappingsComponent (TMappings &&... mapping)

Constructs mappings from one or more semantic/name entries. More...

Public Member Attributes Index

template <typename TOwnerHandle, typename TUniformScope>
std::array< std::string, UniformSemanticsCount >mappings {}

Mapping table from semantic index to uniform name. More...

Public Static Attributes Index

template <typename TOwnerHandle, typename TUniformScope>
static constexpr autoUniformSemanticsCount = ...

Number of supported uniform semantics. More...

Description

Stores uniform names indexed by UniformSemantics.

Template Parameters
TOwnerHandle

Owner handle type used by ECS composition.

Definition at line 26 of file UniformMappingsComponent.ixx.

Public Constructors

UniformMappingsComponent()

template <typename ... TMappings>
helios::engine::rendering::shader::components::UniformMappingsComponent< TOwnerHandle, TUniformScope >::UniformMappingsComponent (TMappings &&... mapping)
inline explicit

Constructs mappings from one or more semantic/name entries.

Template Parameters
TMappings

Mapping entry types compatible with UniformMapping.

Parameters
mapping

Mapping entries assigned into mappings by semantic index.

The constructor asserts that each semantic value is within the valid [0, UniformSemanticsCount) range.

Definition at line 51 of file UniformMappingsComponent.ixx.

52 {
53 (assert(std::to_underlying(mapping.semantics) < UniformSemanticsCount
54 && "UniformSemantics value out of range in UniformMappingsComponent constructor"), ...);
55
56 ((mappings[std::to_underlying(mapping.semantics)] = std::move(mapping.name)), ...);
57 }

References helios::engine::rendering::shader::components::UniformMappingsComponent< TOwnerHandle, TUniformScope >::mappings, helios::engine::rendering::registerComponents and helios::engine::rendering::shader::components::UniformMappingsComponent< TOwnerHandle, TUniformScope >::UniformSemanticsCount.

Public Member Attributes

mappings

template <typename TOwnerHandle, typename TUniformScope>
std::array<std::string, UniformSemanticsCount> helios::engine::rendering::shader::components::UniformMappingsComponent< TOwnerHandle, TUniformScope >::mappings {}

Mapping table from semantic index to uniform name.

Definition at line 38 of file UniformMappingsComponent.ixx.

38 std::array<std::string, UniformSemanticsCount> mappings{};

Referenced by helios::engine::rendering::shader::components::UniformMappingsComponent< TOwnerHandle, TUniformScope >::UniformMappingsComponent.

Public Static Attributes

UniformSemanticsCount

template <typename TOwnerHandle, typename TUniformScope>
constexpr auto helios::engine::rendering::shader::components::UniformMappingsComponent< TOwnerHandle, TUniformScope >::UniformSemanticsCount
constexpr static

Number of supported uniform semantics.

Initialiser
= static_cast<std::size_t>( std::to_underlying(UniformSemantics::size_) )

Definition at line 31 of file UniformMappingsComponent.ixx.

31 static constexpr auto UniformSemanticsCount = static_cast<std::size_t>(

Referenced by helios::engine::rendering::shader::components::UniformMappingsComponent< TOwnerHandle, TUniformScope >::UniformMappingsComponent.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.