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 27 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 52 of file UniformMappingsComponent.ixx.

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

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 39 of file UniformMappingsComponent.ixx.

39 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 32 of file UniformMappingsComponent.ixx.

32 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.