diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-11-14 17:14:54 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-11-23 17:51:12 +0000 |
commit | 97c797975802f5a0763a4ac602dfaa97ca0ba015 (patch) | |
tree | 9f0a7375b7042e884d35bde6f95e219f186bd753 /src/render/graphicshelpers/graphicscontext_p.h | |
parent | 744c3cb7d397a3e136eaa6110969b6fe8b8d96a9 (diff) |
GraphicsContext::applyUniform: take uniform size into account
Needed when specifying arrays of floats...
Change-Id: I80418af7bc38379ec1a6d3b52354f152b4445fe1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext_p.h')
-rw-r--r-- | src/render/graphicshelpers/graphicscontext_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/graphicshelpers/graphicscontext_p.h b/src/render/graphicshelpers/graphicscontext_p.h index 013c8bd86..baf0cf459 100644 --- a/src/render/graphicshelpers/graphicscontext_p.h +++ b/src/render/graphicshelpers/graphicscontext_p.h @@ -321,7 +321,7 @@ private: void applyUniform(const ShaderUniform &description, const UniformValue &v); template<UniformType> - void applyUniformHelper(int, const UniformValue &) const + void applyUniformHelper(int, int, const UniformValue &) const { Q_ASSERT_X(false, Q_FUNC_INFO, "Uniform: Didn't provide specialized apply() implementation"); } @@ -329,13 +329,13 @@ private: #define QT3D_UNIFORM_TYPE_PROTO(UniformTypeEnum, BaseType, Func) \ template<> \ -void GraphicsContext::applyUniformHelper<UniformTypeEnum>(int location, const UniformValue &value) const; +void GraphicsContext::applyUniformHelper<UniformTypeEnum>(int location, int count, const UniformValue &value) const; #define QT3D_UNIFORM_TYPE_IMPL(UniformTypeEnum, BaseType, Func) \ template<> \ - void GraphicsContext::applyUniformHelper<UniformTypeEnum>(int location, const UniformValue &value) const \ + void GraphicsContext::applyUniformHelper<UniformTypeEnum>(int location, int count, const UniformValue &value) const \ { \ - m_glHelper->Func(location, 1, value.constData<BaseType>()); \ + m_glHelper->Func(location, count, value.constData<BaseType>()); \ } |