Skip to main content

Shader Class

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

Declaration

class helios::rendering::shader::Shader { ... }

Derived Classes

classOpenGLShader

An OpenGL-specific implementation of a Shader program, consisting of a vertex and a fragment shader. More...

Public Destructor Index

~Shader ()=default

Public Member Functions Index

voiduse () const noexcept=0

Activates this shader for subsequent rendering operations. Draw calls of the current rendering pass will use this shader until it is unbound or another shader is bound. More...

voidapplyUniformValues (const UniformValueMap &uniformValueMap) const noexcept=0

Applies the specified UniformValueMap to the uniforms defined by the shader. This method does not change the binding state of the shader, but it passes the uniform values to the underlying rendering backend. Implementations should ensure that the shader is properly bound before this method is called. More...

Protected Static Attributes Index

static const helios::util::log::Logger &logger_ = ...

Shared logger instance for all Shader objects. More...

Description

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

This class defines common operations for managing and utilizing shaders. Derived classes provide rendering API specifics for loading and compiling the shaders.

Definition at line 23 of file Shader.ixx.

Public Destructor

~Shader()

virtual helios::rendering::shader::Shader::~Shader ()
virtual default

Definition at line 35 of file Shader.ixx.

Public Member Functions

applyUniformValues()

virtual void helios::rendering::shader::Shader::applyUniformValues (const UniformValueMap & uniformValueMap)
noexcept

Applies the specified UniformValueMap to the uniforms defined by the shader. This method does not change the binding state of the shader, but it passes the uniform values to the underlying rendering backend. Implementations should ensure that the shader is properly bound before this method is called.

Parameters
uniformValueMap

A const ref to the `UniformValueMap` containing the values for the uniforms in this shader.

Definition at line 53 of file Shader.ixx.

Reference applyUniformValues.

Referenced by applyUniformValues.

use()

virtual void helios::rendering::shader::Shader::use ()
noexcept

Activates this shader for subsequent rendering operations. Draw calls of the current rendering pass will use this shader until it is unbound or another shader is bound.

Definition at line 42 of file Shader.ixx.

Protected Static Attributes

logger_

const helios::util::log::Logger& helios::rendering::shader::Shader::logger_
protected static

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.