From 493578624d6cf5513983b1df49fa945dd9cee26f Mon Sep 17 00:00:00 2001 From: "T.Sang Tran" Date: Mon, 23 Aug 2021 09:32:20 +0200 Subject: [PATCH] Components (Overlay & RTS): Fix compiling issues regarding mismatch and ambiguous between float and double. --- Components/Overlay/src/OgreFont.cpp | 2 +- Components/RTShaderSystem/src/OgreShaderProgram.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Components/Overlay/src/OgreFont.cpp b/Components/Overlay/src/OgreFont.cpp index 824e086829d..85079c6acf4 100644 --- a/Components/Overlay/src/OgreFont.cpp +++ b/Components/Overlay/src/OgreFont.cpp @@ -540,7 +540,7 @@ namespace Ogre (Real)m / (Real)finalHeight, // v1 (Real)(l + width) / (Real)finalWidth, // u2 (m + max_height) / (Real)finalHeight); // v2 - this->setGlyphInfo({cp, uvs, textureAspect * uvs.width() / uvs.height(), + this->setGlyphInfo({cp, uvs, float(textureAspect * uvs.width() / uvs.height()), float(x_bearing) / max_height, float(advance) / max_height}); // Advance a column diff --git a/Components/RTShaderSystem/src/OgreShaderProgram.cpp b/Components/RTShaderSystem/src/OgreShaderProgram.cpp index 5477bb7c554..9694c8068e0 100644 --- a/Components/RTShaderSystem/src/OgreShaderProgram.cpp +++ b/Components/RTShaderSystem/src/OgreShaderProgram.cpp @@ -167,7 +167,7 @@ UniformParameterPtr Program::resolveAutoParameterReal(GpuProgramParameters::Auto } // Create new parameter. - param = UniformParameterPtr(OGRE_NEW UniformParameter(autoType, data, size)); + param = UniformParameterPtr(OGRE_NEW UniformParameter(autoType, float(data), size)); addParameter(param); return param;