Skip to main content

Shader.ixx File

Abstraction for a compiled shader program. More...

Included Headers

Namespaces Index

namespacehelios
namespacerendering

Graphics rendering infrastructure. More...

namespaceshader

Shader program management. More...

Classes Index

classShader

Abstract representation of a Shader program (e.g. composed of vertex/fragment shader). More...

Macro Definitions Index

#defineHELIOS_LOG_SCOPE   "helios::rendering::shader::Shader"

Description

Abstraction for a compiled shader program.

Macro Definitions

HELIOS_LOG_SCOPE

#define HELIOS_LOG_SCOPE   "helios::rendering::shader::Shader"

Definition at line 14 of file Shader.ixx.

14#define HELIOS_LOG_SCOPE "helios::rendering::shader::Shader"

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file Shader.ixx
3 * @brief Abstraction for a compiled shader program.
4 */
5module;
6
7export module helios.rendering.shader.Shader;
8
9import helios.util.log.LogManager;
10import helios.util.log.Logger;
11
12import helios.rendering.shader.UniformValueMap;
13
14#define HELIOS_LOG_SCOPE "helios::rendering::shader::Shader"
15export namespace helios::rendering::shader {
16
17 /**
18 * @brief Abstract representation of a Shader program (e.g. composed of vertex/fragment shader).
19 *
20 * This class defines common operations for managing and utilizing shaders.
21 * Derived classes provide rendering API specifics for loading and compiling the shaders.
22 */
23 class Shader {
24
25 protected:
26 /**
27 * @brief Shared logger instance for all Shader objects.
28 */
31 );
32
33 public:
34
35 virtual ~Shader() = default;
36
37 /**
38 * @brief Activates this shader for subsequent rendering operations.
39 * Draw calls of the current rendering pass will use this shader
40 * until it is unbound or another shader is bound.
41 */
42 virtual void use() const noexcept = 0;
43
44 /**
45 * @brief Applies the specified UniformValueMap to the uniforms defined by the shader.
46 * This method does not change the binding state of the shader, but it passes the uniform
47 * values to the underlying rendering backend. Implementations should ensure
48 * that the shader is properly bound before this method is called.
49 *
50 * @param uniformValueMap A const ref to the `UniformValueMap` containing the values for the
51 * uniforms in this shader.
52 */
53 virtual void applyUniformValues(const UniformValueMap& uniformValueMap) const noexcept = 0;
54 };
55
56}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.