20 #ifndef ANTKEEPER_GL_GL_SHADER_VARIABLES_HPP
21 #define ANTKEEPER_GL_GL_SHADER_VARIABLES_HPP
42 void update(
bool value)
const noexcept
override;
43 void update(
bool value, std::size_t index)
const override;
44 void update(std::span<const bool> values, std::size_t index = 0)
const override;
47 GLint gl_uniform_location;
48 mutable std::vector<GLint> ivalues;
66 void update(std::span<const math::bvec2> values, std::size_t index = 0)
const override;
69 GLint gl_uniform_location;
70 mutable std::vector<GLint> ivalues;
88 void update(std::span<const math::bvec3> values, std::size_t index = 0)
const override;
91 GLint gl_uniform_location;
92 mutable std::vector<GLint> ivalues;
110 void update(std::span<const math::bvec4> values, std::size_t index = 0)
const override;
113 GLint gl_uniform_location;
114 mutable std::vector<GLint> ivalues;
130 void update(
int value)
const noexcept
override;
131 void update(
int value, std::size_t index)
const override;
132 void update(std::span<const int> values, std::size_t index = 0)
const override;
135 GLint gl_uniform_location;
153 void update(std::span<const math::ivec2> values, std::size_t index = 0)
const override;
156 GLint gl_uniform_location;
174 void update(std::span<const math::ivec3> values, std::size_t index = 0)
const override;
177 GLint gl_uniform_location;
195 void update(std::span<const math::ivec4> values, std::size_t index = 0)
const override;
198 GLint gl_uniform_location;
214 void update(
unsigned int value)
const noexcept
override;
215 void update(
unsigned int value, std::size_t index)
const override;
216 void update(std::span<const unsigned int> values, std::size_t index = 0)
const override;
219 GLint gl_uniform_location;
237 void update(std::span<const math::uvec2> values, std::size_t index = 0)
const override;
240 GLint gl_uniform_location;
258 void update(std::span<const math::uvec3> values, std::size_t index = 0)
const override;
261 GLint gl_uniform_location;
279 void update(std::span<const math::uvec4> values, std::size_t index = 0)
const override;
282 GLint gl_uniform_location;
298 void update(
float value)
const noexcept
override;
299 void update(
float value, std::size_t index)
const override;
300 void update(std::span<const float> values, std::size_t index = 0)
const override;
303 GLint gl_uniform_location;
321 void update(std::span<const math::fvec2> values, std::size_t index = 0)
const override;
324 GLint gl_uniform_location;
342 void update(std::span<const math::fvec3> values, std::size_t index = 0)
const override;
345 GLint gl_uniform_location;
363 void update(std::span<const math::fvec4> values, std::size_t index = 0)
const override;
366 GLint gl_uniform_location;
384 void update(std::span<const math::fmat2> values, std::size_t index = 0)
const override;
387 GLint gl_uniform_location;
405 void update(std::span<const math::fmat3> values, std::size_t index = 0)
const override;
408 GLint gl_uniform_location;
426 void update(std::span<const math::fmat4> values, std::size_t index = 0)
const override;
429 GLint gl_uniform_location;
447 void update(std::span<const texture_1d* const> values, std::size_t index = 0)
const override;
448 void update(std::span<
const std::shared_ptr<texture_1d>> values, std::size_t index = 0)
const override;
451 GLint gl_uniform_location;
452 std::vector<GLint> gl_texture_unit_indices;
470 void update(std::span<const texture_2d* const> values, std::size_t index = 0)
const override;
471 void update(std::span<
const std::shared_ptr<texture_2d>> values, std::size_t index = 0)
const override;
474 GLint gl_uniform_location;
475 std::vector<GLint> gl_texture_unit_indices;
493 void update(std::span<const texture_3d* const> values, std::size_t index = 0)
const override;
494 void update(std::span<
const std::shared_ptr<texture_3d>> values, std::size_t index = 0)
const override;
497 GLint gl_uniform_location;
498 std::vector<GLint> gl_texture_unit_indices;
516 void update(std::span<const texture_cube* const> values, std::size_t index = 0)
const override;
517 void update(std::span<
const std::shared_ptr<texture_cube>> values, std::size_t index = 0)
const override;
520 GLint gl_uniform_location;
521 std::vector<GLint> gl_texture_unit_indices;
Boolean shader variable implementation using OpenGL.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
void update(bool value) const noexcept override
Updates the value of the variable.
gl_shader_bool(std::size_t size, GLint gl_uniform_location)
2-dimensional boolean vector shader variable implementation using OpenGL.
gl_shader_bvec2(std::size_t size, GLint gl_uniform_location)
void update(const math::bvec2 &value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
3-dimensional boolean vector shader variable implementation using OpenGL.
void update(const math::bvec3 &value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
gl_shader_bvec3(std::size_t size, GLint gl_uniform_location)
4-dimensional boolean vector shader variable implementation using OpenGL.
void update(const math::bvec4 &value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
gl_shader_bvec4(std::size_t size, GLint gl_uniform_location)
Floating-point shader variable implementation using OpenGL.
gl_shader_float(std::size_t size, GLint gl_uniform_location)
void update(float value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
2x2 floating-point matrix shader variable implementation using OpenGL.
void update(const math::fmat2 &value) const noexcept override
Updates the value of the variable.
gl_shader_fmat2(std::size_t size, GLint gl_uniform_location)
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
3x3 floating-point matrix shader variable implementation using OpenGL.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
void update(const math::fmat3 &value) const noexcept override
Updates the value of the variable.
gl_shader_fmat3(std::size_t size, GLint gl_uniform_location)
4x4 floating-point matrix shader variable implementation using OpenGL.
void update(const math::fmat4 &value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
gl_shader_fmat4(std::size_t size, GLint gl_uniform_location)
2-dimensional floating-point vector shader variable implementation using OpenGL.
void update(const math::fvec2 &value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
gl_shader_fvec2(std::size_t size, GLint gl_uniform_location)
3-dimensional floating-point vector shader variable implementation using OpenGL.
void update(const math::fvec3 &value) const noexcept override
Updates the value of the variable.
gl_shader_fvec3(std::size_t size, GLint gl_uniform_location)
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
4-dimensional floating-point vector shader variable implementation using OpenGL.
gl_shader_fvec4(std::size_t size, GLint gl_uniform_location)
void update(const math::fvec4 &value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
Signed integer shader variable implementation using OpenGL.
void update(int value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
gl_shader_int(std::size_t size, GLint gl_uniform_location)
2-dimensional signed integer vector shader variable implementation using OpenGL.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
void update(const math::ivec2 &value) const noexcept override
Updates the value of the variable.
gl_shader_ivec2(std::size_t size, GLint gl_uniform_location)
3-dimensional signed integer vector shader variable implementation using OpenGL.
void update(const math::ivec3 &value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
gl_shader_ivec3(std::size_t size, GLint gl_uniform_location)
4-dimensional signed integer vector shader variable implementation using OpenGL.
void update(const math::ivec4 &value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
gl_shader_ivec4(std::size_t size, GLint gl_uniform_location)
1-dimensional texture shader variable implementation using OpenGL.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
void update(const texture_1d &value) const noexcept override
Updates the value of the variable.
gl_shader_texture_1d(std::size_t size, GLint gl_uniform_location, GLint gl_first_texture_index)
2-dimensional texture shader variable implementation using OpenGL.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
gl_shader_texture_2d(std::size_t size, GLint gl_uniform_location, GLint gl_first_texture_unit_index)
void update(const texture_2d &value) const noexcept override
Updates the value of the variable.
3-dimensional texture shader variable implementation using OpenGL.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
void update(const texture_3d &value) const noexcept override
Updates the value of the variable.
gl_shader_texture_3d(std::size_t size, GLint gl_uniform_location, GLint gl_first_texture_index)
Cube texture shader variable implementation using OpenGL.
gl_shader_texture_cube(std::size_t size, GLint gl_uniform_location, GLint gl_first_texture_index)
void update(const texture_cube &value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
Unsigned integer shader variable implementation using OpenGL.
void update(unsigned int value) const noexcept override
Updates the value of the variable.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
gl_shader_uint(std::size_t size, GLint gl_uniform_location)
2-dimensional unsigned integer vector shader variable implementation using OpenGL.
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
void update(const math::uvec2 &value) const noexcept override
Updates the value of the variable.
gl_shader_uvec2(std::size_t size, GLint gl_uniform_location)
3-dimensional unsigned integer vector shader variable implementation using OpenGL.
gl_shader_uvec3(std::size_t size, GLint gl_uniform_location)
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
void update(const math::uvec3 &value) const noexcept override
Updates the value of the variable.
4-dimensional unsigned integer vector shader variable implementation using OpenGL.
void update(const math::uvec4 &value) const noexcept override
Updates the value of the variable.
gl_shader_uvec4(std::size_t size, GLint gl_uniform_location)
constexpr shader_variable_type type() const noexcept override
Returns the shader variable data type.
std::size_t size() const noexcept
Returns the number of elements in an array variable, or 1 if the variable is not an array.
Graphics library interface.
shader_variable_type
Shader variable data types.
n by m column-major matrix.