Skip to main content

IsShaderLike.ixx File

Concept constraining types usable as shader abstractions. More...

Included Headers

#include <concepts> #include <helios.rendering.shader.UniformValueMap>

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespacecommon

Shared type definitions, concepts, and tags used across engine subsystems. More...

namespaceconcepts

Compile-time concepts for engine role classification and capability detection. More...

Classes Index

classUniformValueMap

Maps uniform semantics to their values for shader parameter binding. More...

Description

Concept constraining types usable as shader abstractions.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file IsShaderLike.ixx
3 * @brief Concept constraining types usable as shader abstractions.
4 */
5module;
6
7#include <concepts>
8
9export module helios.engine.common.concepts.IsShaderLike;
10
11import helios.rendering.shader.UniformValueMap;
12
14
16
17 /**
18 * @brief Constrains T to types that provide a minimal shader interface.
19 *
20 * @details A type satisfies IsShaderLike if it:
21 * 1 Provides `void use()` to bind the shader for rendering.
22 * 2 Provides `void applyUniformValues(UniformValueMap&)` to set
23 * uniform parameters from a value map.
24 *
25 * @tparam T The type to constrain.
26 *
27 * @see UniformValueMap
28 */
29 template<class T>
30 concept IsShaderLike = requires(const T& t, const UniformValueMap& uniformValueMap) {
31 {
32 t.use()
33 } -> std::same_as<void>;
34 {
35 t.applyUniformValues(uniformValueMap)
36 } -> std::same_as<void>;
37
38 };
39
40}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.