From 6607c6440d4e3e7313e421f6258b52e6b7982170 Mon Sep 17 00:00:00 2001 From: Mozzarella32 <143010987+Mozzarella32@users.noreply.github.com> Date: Sat, 18 Oct 2025 13:34:33 +0200 Subject: renderer: add 1fv and 2fv uniform support (#12080) --- src/render/Shader.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/render/Shader.hpp') diff --git a/src/render/Shader.hpp b/src/render/Shader.hpp index 88651302..780b7fa8 100644 --- a/src/render/Shader.hpp +++ b/src/render/Shader.hpp @@ -89,14 +89,14 @@ struct SShader { std::array value = {}; }; - struct SUniform4Data { + struct SUniformVData { GLsizei count = 0; std::vector value; }; // std::array, std::array, std::array, SUniformMatrix3Data, SUniformMatrix4Data, - SUniform4Data>, + SUniformVData>, SHADER_LAST> uniformStatus; // @@ -109,6 +109,11 @@ struct SShader { void setUniformFloat4(eShaderUniform location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); void setUniformMatrix3fv(eShaderUniform location, GLsizei count, GLboolean transpose, std::array value); void setUniformMatrix4x2fv(eShaderUniform location, GLsizei count, GLboolean transpose, std::array value); - void setUniform4fv(eShaderUniform location, GLsizei count, std::vector value); + void setUniform1fv(eShaderUniform location, GLsizei count, const std::vector& value); + void setUniform2fv(eShaderUniform location, GLsizei count, const std::vector& value); + void setUniform4fv(eShaderUniform location, GLsizei count, const std::vector& value); void destroy(); + + private: + void setUniformfv(eShaderUniform location, GLsizei count, const std::vector& value, GLsizei vec_size); }; -- cgit v1.2.3