Antkeeper
0.0.1
|
2-dimensional texture shader variable implementation using OpenGL. More...
#include <gl-shader-variables.hpp>
Public Member Functions | |
gl_shader_texture_2d (std::size_t size, GLint gl_uniform_location, GLint gl_first_texture_unit_index) | |
constexpr shader_variable_type | type () const noexcept override |
Returns the shader variable data type. More... | |
void | update (const texture_2d &value) const noexcept override |
Updates the value of the variable. More... | |
void | update (const texture_2d &value, std::size_t index) const override |
Updates the value of a single element in an array variable. More... | |
void | update (std::span< const texture_2d *const > values, std::size_t index=0) const override |
Updates the values of one or more elements in an array variable. More... | |
void | update (std::span< const std::shared_ptr< texture_2d >> values, std::size_t index=0) const override |
Updates the values of one or more elements in an array variable. 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_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_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_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_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... | |
Additional Inherited Members | |
![]() | |
shader_variable (std::size_t size) noexcept | |
Constructs a shader variable. More... | |
2-dimensional texture shader variable implementation using OpenGL.
Definition at line 458 of file gl-shader-variables.hpp.
gl::gl_shader_texture_2d::gl_shader_texture_2d | ( | std::size_t | size, |
GLint | gl_uniform_location, | ||
GLint | gl_first_texture_unit_index | ||
) |
Definition at line 495 of file gl-shader-variables.cpp.
|
inlineconstexproverridevirtualnoexcept |
Returns the shader variable data type.
Implements gl::shader_variable.
Definition at line 463 of file gl-shader-variables.hpp.
|
overridevirtualnoexcept |
Updates the value of the variable.
If the variable is an array, the value of the first element will be updated.
value | Update value. |
std::invalid_argument | Shader variable type mismatch. |
Reimplemented from gl::shader_variable.
Definition at line 503 of file gl-shader-variables.cpp.
|
overridevirtual |
Updates the value of a single element in an array variable.
value | Update value. |
index | Index of the element to update. |
std::invalid_argument | Shader variable type mismatch. |
Reimplemented from gl::shader_variable.
Definition at line 513 of file gl-shader-variables.cpp.
|
overridevirtual |
Updates the values of one or more elements in an array variable.
values | Contiguous sequence of update values. |
index | Index of the first element to update. |
std::invalid_argument | Shader variable type mismatch. |
Reimplemented from gl::shader_variable.
Definition at line 538 of file gl-shader-variables.cpp.
|
overridevirtual |
Updates the values of one or more elements in an array variable.
values | Contiguous sequence of update values. |
index | Index of the first element to update. |
std::invalid_argument | Shader variable type mismatch. |
Reimplemented from gl::shader_variable.
Definition at line 525 of file gl-shader-variables.cpp.