diff --git a/IGLU/simple_renderer/ShaderUniforms.cpp b/IGLU/simple_renderer/ShaderUniforms.cpp index 46f076192a..80ee950de0 100644 --- a/IGLU/simple_renderer/ShaderUniforms.cpp +++ b/IGLU/simple_renderer/ShaderUniforms.cpp @@ -415,6 +415,15 @@ void ShaderUniforms::setFloat3(const igl::NameHandle& uniformName, setUniformBytes(uniformName, &value, sizeof(float[3]), 1, arrayIndex); } +void ShaderUniforms::setFloat3(const igl::NameHandle& blockTypeName, + const igl::NameHandle& blockInstanceName, + const igl::NameHandle& memberName, + const iglu::simdtypes::float3& value, + size_t arrayIndex) { + setUniformBytes( + blockTypeName, blockInstanceName, memberName, &value, sizeof(float[3]), 1, arrayIndex); +} + void ShaderUniforms::setFloat3Array(const igl::NameHandle& uniformName, iglu::simdtypes::float3* value, size_t count, @@ -422,6 +431,21 @@ void ShaderUniforms::setFloat3Array(const igl::NameHandle& uniformName, setUniformBytes(uniformName, value, sizeof(iglu::simdtypes::float3), count, arrayIndex); } +void ShaderUniforms::setFloat3Array(const igl::NameHandle& blockTypeName, + const igl::NameHandle& blockInstanceName, + const igl::NameHandle& memberName, + iglu::simdtypes::float3* value, + size_t count, + size_t arrayIndex) { + setUniformBytes(blockTypeName, + blockInstanceName, + memberName, + value, + sizeof(iglu::simdtypes::float3), + count, + arrayIndex); +} + void ShaderUniforms::setFloat4(const igl::NameHandle& uniformName, const iglu::simdtypes::float4& value, size_t arrayIndex) { @@ -512,6 +536,20 @@ void ShaderUniforms::setFloat3x3(const igl::NameHandle& uniformName, setUniformBytes(uniformName, &value, sizeof(iglu::simdtypes::float3x3), 1, arrayIndex); } +void ShaderUniforms::setFloat3x3(const igl::NameHandle& blockTypeName, + const igl::NameHandle& blockInstanceName, + const igl::NameHandle& memberName, + const iglu::simdtypes::float3x3& value, + size_t arrayIndex) { + setUniformBytes(blockTypeName, + blockInstanceName, + memberName, + &value, + sizeof(iglu::simdtypes::float3x3), + 1, + arrayIndex); +} + void ShaderUniforms::setFloat3x3Array(const igl::NameHandle& uniformName, const iglu::simdtypes::float3x3* value, size_t count, @@ -519,6 +557,21 @@ void ShaderUniforms::setFloat3x3Array(const igl::NameHandle& uniformName, setUniformBytes(uniformName, value, sizeof(iglu::simdtypes::float3x3), count, arrayIndex); } +void ShaderUniforms::setFloat3x3Array(const igl::NameHandle& blockTypeName, + const igl::NameHandle& blockInstanceName, + const igl::NameHandle& memberName, + const iglu::simdtypes::float3x3* value, + size_t count, + size_t arrayIndex) { + setUniformBytes(blockTypeName, + blockInstanceName, + memberName, + value, + sizeof(iglu::simdtypes::float3x3), + count, + arrayIndex); +} + void ShaderUniforms::setFloat4x4(const igl::NameHandle& uniformName, const iglu::simdtypes::float4x4& value, size_t arrayIndex) { diff --git a/IGLU/simple_renderer/ShaderUniforms.h b/IGLU/simple_renderer/ShaderUniforms.h index 9d0d96f35d..6e4b8c84a9 100644 --- a/IGLU/simple_renderer/ShaderUniforms.h +++ b/IGLU/simple_renderer/ShaderUniforms.h @@ -83,10 +83,21 @@ class ShaderUniforms final { void setFloat3(const igl::NameHandle& uniformName, const iglu::simdtypes::float3& value, size_t arrayIndex = 0); + void setFloat3(const igl::NameHandle& blockTypeName, + const igl::NameHandle& blockInstanceName, + const igl::NameHandle& memberName, + const iglu::simdtypes::float3& value, + size_t arrayIndex = 0); void setFloat3Array(const igl::NameHandle& uniformName, iglu::simdtypes::float3* value, size_t count = 1, size_t arrayIndex = 0); + void setFloat3Array(const igl::NameHandle& blockTypeName, + const igl::NameHandle& blockInstanceName, + const igl::NameHandle& memberName, + iglu::simdtypes::float3* value, + size_t count = 1, + size_t arrayIndex = 0); void setFloat4(const igl::NameHandle& uniformName, const iglu::simdtypes::float4& value, @@ -129,10 +140,21 @@ class ShaderUniforms final { void setFloat3x3(const igl::NameHandle& uniformName, const iglu::simdtypes::float3x3& value, size_t arrayIndex = 0); + void setFloat3x3(const igl::NameHandle& blockTypeName, + const igl::NameHandle& blockInstanceName, + const igl::NameHandle& memberName, + const iglu::simdtypes::float3x3& value, + size_t arrayIndex = 0); void setFloat3x3Array(const igl::NameHandle& uniformName, const iglu::simdtypes::float3x3* value, size_t count = 1, size_t arrayIndex = 0); + void setFloat3x3Array(const igl::NameHandle& blockTypeName, + const igl::NameHandle& blockInstanceName, + const igl::NameHandle& memberName, + const iglu::simdtypes::float3x3* value, + size_t count = 1, + size_t arrayIndex = 0); void setFloat4x4(const igl::NameHandle& uniformName, const iglu::simdtypes::float4x4& value,