Antkeeper  0.0.1
Public Member Functions | Protected Member Functions | List of all members
gl::shader_variable Class Referenceabstract

Shader program variable. More...

#include <shader-variable.hpp>

Inheritance diagram for gl::shader_variable:
gl::gl_shader_bool gl::gl_shader_bvec2 gl::gl_shader_bvec3 gl::gl_shader_bvec4 gl::gl_shader_float gl::gl_shader_fmat2 gl::gl_shader_fmat3 gl::gl_shader_fmat4 gl::gl_shader_fvec2 gl::gl_shader_fvec3 gl::gl_shader_fvec4 gl::gl_shader_int gl::gl_shader_ivec2 gl::gl_shader_ivec3 gl::gl_shader_ivec4 gl::gl_shader_texture_1d gl::gl_shader_texture_2d gl::gl_shader_texture_3d gl::gl_shader_texture_cube gl::gl_shader_uint gl::gl_shader_uvec2 gl::gl_shader_uvec3 gl::gl_shader_uvec4

Public Member Functions

virtual constexpr shader_variable_type type () const noexcept=0
 Returns the shader variable data type. More...
 
std::size_t size () const noexcept
 Returns the number of elements in an array variable, or 1 if the variable is not an array. More...
 
virtual void update (bool value) const
 Updates the value of the variable. More...
 
virtual void update (const math::bvec2 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::bvec3 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::bvec4 &value) const
 Updates the value of the variable. More...
 
virtual void update (int value) const
 Updates the value of the variable. More...
 
virtual void update (const math::ivec2 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::ivec3 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::ivec4 &value) const
 Updates the value of the variable. More...
 
virtual void update (unsigned int value) const
 Updates the value of the variable. More...
 
virtual void update (const math::uvec2 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::uvec3 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::uvec4 &value) const
 Updates the value of the variable. More...
 
virtual void update (float value) const
 Updates the value of the variable. More...
 
virtual void update (const math::fvec2 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::fvec3 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::fvec4 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::fmat2 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::fmat3 &value) const
 Updates the value of the variable. More...
 
virtual void update (const math::fmat4 &value) const
 Updates the value of the variable. More...
 
virtual void update (const texture_1d &value) const
 Updates the value of the variable. More...
 
virtual void update (const texture_2d &value) const
 Updates the value of the variable. More...
 
virtual void update (const texture_3d &value) const
 Updates the value of the variable. More...
 
virtual void update (const texture_cube &value) const
 Updates the value of the variable. More...
 
virtual void update (bool value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::bvec2 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::bvec3 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::bvec4 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (int value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::ivec2 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::ivec3 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::ivec4 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (unsigned int value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::uvec2 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::uvec3 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::uvec4 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (float value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::fvec2 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::fvec3 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::fvec4 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::fmat2 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::fmat3 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const math::fmat4 &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const texture_1d &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const texture_2d &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const texture_3d &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (const texture_cube &value, std::size_t index) const
 Updates the value of a single element in an array variable. More...
 
virtual void update (std::span< const bool > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::bvec2 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::bvec3 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::bvec4 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const int > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::ivec2 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::ivec3 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::ivec4 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const unsigned int > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::uvec2 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::uvec3 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::uvec4 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const float > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::fvec2 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::fvec3 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::fvec4 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::fmat2 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::fmat3 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const math::fmat4 > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const texture_1d *const > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const texture_2d *const > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const texture_3d *const > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const texture_cube *const > values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const std::shared_ptr< texture_1d >> values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const std::shared_ptr< texture_2d >> values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const std::shared_ptr< texture_3d >> values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 
virtual void update (std::span< const std::shared_ptr< texture_cube >> values, std::size_t index=0) const
 Updates the values of one or more elements in an array variable. More...
 

Protected Member Functions

 shader_variable (std::size_t size) noexcept
 Constructs a shader variable. More...
 

Detailed Description

Shader program variable.

Definition at line 40 of file shader-variable.hpp.

Constructor & Destructor Documentation

◆ shader_variable()

gl::shader_variable::shader_variable ( std::size_t  size)
explicitprotectednoexcept

Constructs a shader variable.

Parameters
sizeNumber of elements in the array, or 1 if the variable is not an array.

Definition at line 27 of file shader-variable.cpp.

Member Function Documentation

◆ size()

std::size_t gl::shader_variable::size ( ) const
inlinenoexcept

Returns the number of elements in an array variable, or 1 if the variable is not an array.

Definition at line 51 of file shader-variable.hpp.

◆ type()

virtual constexpr shader_variable_type gl::shader_variable::type ( ) const
constexprpure virtualnoexcept

◆ update() [1/73]

void gl::shader_variable::update ( bool  value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_bool.

Definition at line 31 of file shader-variable.cpp.

◆ update() [2/73]

void gl::shader_variable::update ( bool  value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_bool.

Definition at line 146 of file shader-variable.cpp.

◆ update() [3/73]

void gl::shader_variable::update ( const math::bvec2 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

Definition at line 36 of file shader-variable.cpp.

◆ update() [4/73]

void gl::shader_variable::update ( const math::bvec2 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

Definition at line 151 of file shader-variable.cpp.

◆ update() [5/73]

void gl::shader_variable::update ( const math::bvec3 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

Definition at line 41 of file shader-variable.cpp.

◆ update() [6/73]

void gl::shader_variable::update ( const math::bvec3 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

Definition at line 156 of file shader-variable.cpp.

◆ update() [7/73]

void gl::shader_variable::update ( const math::bvec4 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

Definition at line 46 of file shader-variable.cpp.

◆ update() [8/73]

void gl::shader_variable::update ( const math::bvec4 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

Definition at line 161 of file shader-variable.cpp.

◆ update() [9/73]

void gl::shader_variable::update ( const math::fmat2 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_fmat2.

Definition at line 111 of file shader-variable.cpp.

◆ update() [10/73]

void gl::shader_variable::update ( const math::fmat2 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_fmat2.

Definition at line 226 of file shader-variable.cpp.

◆ update() [11/73]

void gl::shader_variable::update ( const math::fmat3 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_fmat3.

Definition at line 116 of file shader-variable.cpp.

◆ update() [12/73]

void gl::shader_variable::update ( const math::fmat3 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_fmat3.

Definition at line 231 of file shader-variable.cpp.

◆ update() [13/73]

void gl::shader_variable::update ( const math::fmat4 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_fmat4.

Definition at line 121 of file shader-variable.cpp.

◆ update() [14/73]

void gl::shader_variable::update ( const math::fmat4 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_fmat4.

Definition at line 236 of file shader-variable.cpp.

◆ update() [15/73]

virtual void gl::shader_variable::update ( const math::fvec2 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

◆ update() [16/73]

virtual void gl::shader_variable::update ( const math::fvec2 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

◆ update() [17/73]

virtual void gl::shader_variable::update ( const math::fvec3 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

◆ update() [18/73]

virtual void gl::shader_variable::update ( const math::fvec3 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

◆ update() [19/73]

virtual void gl::shader_variable::update ( const math::fvec4 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

◆ update() [20/73]

virtual void gl::shader_variable::update ( const math::fvec4 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

◆ update() [21/73]

virtual void gl::shader_variable::update ( const math::ivec2 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

◆ update() [22/73]

virtual void gl::shader_variable::update ( const math::ivec2 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

◆ update() [23/73]

virtual void gl::shader_variable::update ( const math::ivec3 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

◆ update() [24/73]

virtual void gl::shader_variable::update ( const math::ivec3 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

◆ update() [25/73]

virtual void gl::shader_variable::update ( const math::ivec4 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

◆ update() [26/73]

virtual void gl::shader_variable::update ( const math::ivec4 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

◆ update() [27/73]

virtual void gl::shader_variable::update ( const math::uvec2 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

◆ update() [28/73]

virtual void gl::shader_variable::update ( const math::uvec2 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

◆ update() [29/73]

virtual void gl::shader_variable::update ( const math::uvec3 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

◆ update() [30/73]

virtual void gl::shader_variable::update ( const math::uvec3 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

◆ update() [31/73]

virtual void gl::shader_variable::update ( const math::uvec4 value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

◆ update() [32/73]

virtual void gl::shader_variable::update ( const math::uvec4 value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

◆ update() [33/73]

void gl::shader_variable::update ( const texture_1d value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_1d.

Definition at line 126 of file shader-variable.cpp.

◆ update() [34/73]

void gl::shader_variable::update ( const texture_1d value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_1d.

Definition at line 241 of file shader-variable.cpp.

◆ update() [35/73]

void gl::shader_variable::update ( const texture_2d value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_2d.

Definition at line 131 of file shader-variable.cpp.

◆ update() [36/73]

void gl::shader_variable::update ( const texture_2d value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_2d.

Definition at line 246 of file shader-variable.cpp.

◆ update() [37/73]

void gl::shader_variable::update ( const texture_3d value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_3d.

Definition at line 136 of file shader-variable.cpp.

◆ update() [38/73]

void gl::shader_variable::update ( const texture_3d value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_3d.

Definition at line 251 of file shader-variable.cpp.

◆ update() [39/73]

void gl::shader_variable::update ( const texture_cube value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_cube.

Definition at line 141 of file shader-variable.cpp.

◆ update() [40/73]

void gl::shader_variable::update ( const texture_cube value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_cube.

Definition at line 256 of file shader-variable.cpp.

◆ update() [41/73]

void gl::shader_variable::update ( float  value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_float.

Definition at line 91 of file shader-variable.cpp.

◆ update() [42/73]

void gl::shader_variable::update ( float  value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_float.

Definition at line 206 of file shader-variable.cpp.

◆ update() [43/73]

void gl::shader_variable::update ( int  value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_int.

Definition at line 51 of file shader-variable.cpp.

◆ update() [44/73]

void gl::shader_variable::update ( int  value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_int.

Definition at line 166 of file shader-variable.cpp.

◆ update() [45/73]

void gl::shader_variable::update ( std::span< const bool >  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_bool.

Definition at line 261 of file shader-variable.cpp.

◆ update() [46/73]

void gl::shader_variable::update ( std::span< const float >  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_float.

Definition at line 321 of file shader-variable.cpp.

◆ update() [47/73]

void gl::shader_variable::update ( std::span< const int >  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_int.

Definition at line 281 of file shader-variable.cpp.

◆ update() [48/73]

void gl::shader_variable::update ( std::span< const math::bvec2 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

Definition at line 266 of file shader-variable.cpp.

◆ update() [49/73]

void gl::shader_variable::update ( std::span< const math::bvec3 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

Definition at line 271 of file shader-variable.cpp.

◆ update() [50/73]

void gl::shader_variable::update ( std::span< const math::bvec4 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

Definition at line 276 of file shader-variable.cpp.

◆ update() [51/73]

void gl::shader_variable::update ( std::span< const math::fmat2 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_fmat2.

Definition at line 341 of file shader-variable.cpp.

◆ update() [52/73]

void gl::shader_variable::update ( std::span< const math::fmat3 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_fmat3.

Definition at line 346 of file shader-variable.cpp.

◆ update() [53/73]

void gl::shader_variable::update ( std::span< const math::fmat4 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_fmat4.

Definition at line 351 of file shader-variable.cpp.

◆ update() [54/73]

virtual void gl::shader_variable::update ( std::span< const math::fvec2 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

◆ update() [55/73]

virtual void gl::shader_variable::update ( std::span< const math::fvec3 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

◆ update() [56/73]

virtual void gl::shader_variable::update ( std::span< const math::fvec4 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

◆ update() [57/73]

virtual void gl::shader_variable::update ( std::span< const math::ivec2 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

◆ update() [58/73]

virtual void gl::shader_variable::update ( std::span< const math::ivec3 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

◆ update() [59/73]

virtual void gl::shader_variable::update ( std::span< const math::ivec4 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

◆ update() [60/73]

virtual void gl::shader_variable::update ( std::span< const math::uvec2 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec2, gl::gl_shader_ivec2, gl::gl_shader_fvec2, and gl::gl_shader_bvec2.

◆ update() [61/73]

virtual void gl::shader_variable::update ( std::span< const math::uvec3 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec3, gl::gl_shader_ivec3, gl::gl_shader_fvec3, and gl::gl_shader_bvec3.

◆ update() [62/73]

virtual void gl::shader_variable::update ( std::span< const math::uvec4 values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uvec4, gl::gl_shader_ivec4, gl::gl_shader_fvec4, and gl::gl_shader_bvec4.

◆ update() [63/73]

void gl::shader_variable::update ( std::span< const std::shared_ptr< texture_1d >>  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_1d.

Definition at line 376 of file shader-variable.cpp.

◆ update() [64/73]

void gl::shader_variable::update ( std::span< const std::shared_ptr< texture_2d >>  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_2d.

Definition at line 381 of file shader-variable.cpp.

◆ update() [65/73]

void gl::shader_variable::update ( std::span< const std::shared_ptr< texture_3d >>  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_3d.

Definition at line 386 of file shader-variable.cpp.

◆ update() [66/73]

void gl::shader_variable::update ( std::span< const std::shared_ptr< texture_cube >>  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_cube.

Definition at line 391 of file shader-variable.cpp.

◆ update() [67/73]

void gl::shader_variable::update ( std::span< const texture_1d *const >  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_1d.

Definition at line 356 of file shader-variable.cpp.

◆ update() [68/73]

void gl::shader_variable::update ( std::span< const texture_2d *const >  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_2d.

Definition at line 361 of file shader-variable.cpp.

◆ update() [69/73]

void gl::shader_variable::update ( std::span< const texture_3d *const >  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_3d.

Definition at line 366 of file shader-variable.cpp.

◆ update() [70/73]

void gl::shader_variable::update ( std::span< const texture_cube *const >  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_texture_cube.

Definition at line 371 of file shader-variable.cpp.

◆ update() [71/73]

void gl::shader_variable::update ( std::span< const unsigned int >  values,
std::size_t  index = 0 
) const
virtual

Updates the values of one or more elements in an array variable.

Parameters
valuesContiguous sequence of update values.
indexIndex of the first element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uint.

Definition at line 301 of file shader-variable.cpp.

◆ update() [72/73]

void gl::shader_variable::update ( unsigned int  value) const
virtual

Updates the value of the variable.

If the variable is an array, the value of the first element will be updated.

Parameters
valueUpdate value.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uint.

Definition at line 71 of file shader-variable.cpp.

◆ update() [73/73]

void gl::shader_variable::update ( unsigned int  value,
std::size_t  index 
) const
virtual

Updates the value of a single element in an array variable.

Parameters
valueUpdate value.
indexIndex of the element to update.
Exceptions
std::invalid_argumentShader variable type mismatch.

Reimplemented in gl::gl_shader_uint.

Definition at line 186 of file shader-variable.cpp.


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