diff options
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext.cpp')
-rw-r--r-- | src/render/graphicshelpers/graphicscontext.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp index 8c0803a79..9ec544b11 100644 --- a/src/render/graphicshelpers/graphicscontext.cpp +++ b/src/render/graphicshelpers/graphicscontext.cpp @@ -1205,7 +1205,14 @@ void GraphicsContext::applyUniform(const ShaderUniform &description, const Unifo switch (type) { case UniformType::Float: - applyUniformHelper<UniformType::Float>(description.m_location, description.m_size, v); + // See QTBUG-57510 and uniform_p.h + if (v.storedType() == Int) { + float value = float(*v.constData<int>()); + UniformValue floatV(value); + applyUniformHelper<UniformType::Float>(description.m_location, description.m_size, floatV); + } else { + applyUniformHelper<UniformType::Float>(description.m_location, description.m_size, v); + } break; case UniformType::Vec2: applyUniformHelper<UniformType::Vec2>(description.m_location, description.m_size, v); |