20 #ifndef ANTKEEPER_GL_SHADER_INPUT_HPP
21 #define ANTKEEPER_GL_SHADER_INPUT_HPP
51 [[nodiscard]] inline std::
size_t size() const noexcept
64 virtual void update(
bool value)
const;
69 virtual void update(
int value)
const;
74 virtual void update(
unsigned int value)
const;
79 virtual void update(
float value)
const;
103 virtual void update(
bool value, std::size_t index)
const;
108 virtual void update(
int value, std::size_t index)
const;
113 virtual void update(
unsigned int value, std::size_t index)
const;
118 virtual void update(
float value, std::size_t index)
const;
142 virtual void update(std::span<const bool> values, std::size_t index = 0)
const;
143 virtual void update(std::span<const math::bvec2> values, std::size_t index = 0)
const;
144 virtual void update(std::span<const math::bvec3> values, std::size_t index = 0)
const;
145 virtual void update(std::span<const math::bvec4> values, std::size_t index = 0)
const;
147 virtual void update(std::span<const int> values, std::size_t index = 0)
const;
148 virtual void update(std::span<const math::ivec2> values, std::size_t index = 0)
const;
149 virtual void update(std::span<const math::ivec3> values, std::size_t index = 0)
const;
150 virtual void update(std::span<const math::ivec4> values, std::size_t index = 0)
const;
152 virtual void update(std::span<const unsigned int> values, std::size_t index = 0)
const;
153 virtual void update(std::span<const math::uvec2> values, std::size_t index = 0)
const;
154 virtual void update(std::span<const math::uvec3> values, std::size_t index = 0)
const;
155 virtual void update(std::span<const math::uvec4> values, std::size_t index = 0)
const;
157 virtual void update(std::span<const float> values, std::size_t index = 0)
const;
158 virtual void update(std::span<const math::fvec2> values, std::size_t index = 0)
const;
159 virtual void update(std::span<const math::fvec3> values, std::size_t index = 0)
const;
160 virtual void update(std::span<const math::fvec4> values, std::size_t index = 0)
const;
162 virtual void update(std::span<const math::fmat2> values, std::size_t index = 0)
const;
163 virtual void update(std::span<const math::fmat3> values, std::size_t index = 0)
const;
164 virtual void update(std::span<const math::fmat4> values, std::size_t index = 0)
const;
166 virtual void update(std::span<const texture_1d* const> values, std::size_t index = 0)
const;
167 virtual void update(std::span<const texture_2d* const> values, std::size_t index = 0)
const;
168 virtual void update(std::span<const texture_3d* const> values, std::size_t index = 0)
const;
169 virtual void update(std::span<const texture_cube* const> values, std::size_t index = 0)
const;
171 virtual void update(std::span<
const std::shared_ptr<texture_1d>> values, std::size_t index = 0)
const;
172 virtual void update(std::span<
const std::shared_ptr<texture_2d>> values, std::size_t index = 0)
const;
173 virtual void update(std::span<
const std::shared_ptr<texture_3d>> values, std::size_t index = 0)
const;
174 virtual void update(std::span<
const std::shared_ptr<texture_cube>> values, std::size_t index = 0)
const;
186 const std::size_t m_size{0};
virtual void update(const math::uvec2 &value) const
Updates the value of the variable.
virtual void update(const math::fvec2 &value) const
Updates the value of the variable.
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.
virtual void update(const math::ivec4 &value, std::size_t index) const
Updates the value of a single element in an array variable.
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.
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.
virtual void update(const math::uvec4 &value) const
Updates the value of the variable.
virtual void update(const math::fvec3 &value) const
Updates the value of the variable.
virtual constexpr shader_variable_type type() const noexcept=0
Returns the shader variable data type.
virtual void update(const math::ivec2 &value) const
Updates the value of the variable.
virtual void update(const math::uvec3 &value, std::size_t index) const
Updates the value of a single element in an array variable.
virtual void update(const math::fvec3 &value, std::size_t index) const
Updates the value of a single element in an array variable.
std::size_t size() const noexcept
Returns the number of elements in an array variable, or 1 if the variable is not an array.
virtual void update(const math::uvec3 &value) const
Updates the value of the variable.
virtual void update(const math::fvec4 &value) const
Updates the value of the variable.
virtual void update(const math::ivec4 &value) const
Updates the value of the variable.
virtual void update(const math::uvec4 &value, std::size_t index) const
Updates the value of a single element in an array variable.
virtual void update(const math::fvec2 &value, std::size_t index) const
Updates the value of a single element in an array variable.
virtual void update(bool value) const
Updates the value of the variable.
virtual void update(const math::ivec3 &value, std::size_t index) const
Updates the value of a single element in an array variable.
shader_variable(std::size_t size) noexcept
Constructs a shader variable.
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.
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.
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.
virtual void update(const math::uvec2 &value, std::size_t index) const
Updates the value of a single element in an array variable.
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.
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.
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.
virtual void update(const math::ivec2 &value, std::size_t index) const
Updates the value of a single element in an array variable.
virtual void update(const math::fvec4 &value, std::size_t index) const
Updates the value of a single element in an array variable.
virtual void update(const math::ivec3 &value) const
Updates the value of the variable.
Graphics library interface.
shader_variable_type
Shader variable data types.
n by m column-major matrix.