summaryrefslogtreecommitdiff
path: root/dev-games/ogre/files/ogre-1.10.11-fix_double_precision-88f0d5b.patch
blob: 53d7a0925d51bca920acc950c1a0e1f6560c4b17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# HG changeset patch
# User niparx <koliap@gmail.com>
# Date 1515160111 -7200
# Node ID 88f0d5be23c521e7504e3f6cb2a153428efcf159
# Parent  bc4fb04c1de686c23c6207eee69ae0ca9fddcb7c
[OGRE-592] RTShaderSystem compile error when using double precision (#622)

RTShaderSystem: compile error when using double precision

https://ogre3d.atlassian.net/browse/OGRE-592

diff --git a/Components/RTShaderSystem/src/OgreShaderFFPTexturing.cpp b/Components/RTShaderSystem/src/OgreShaderFFPTexturing.cpp
--- a/Components/RTShaderSystem/src/OgreShaderFFPTexturing.cpp
+++ b/Components/RTShaderSystem/src/OgreShaderFFPTexturing.cpp
@@ -654,8 +654,12 @@
             curFuncInvocation->pushOperand(ParameterFactory::createConstParam(Vector4(alphaValue)), Operand::OPS_IN);
         }
         else
-        {               
-            curFuncInvocation->pushOperand(ParameterFactory::createConstParam(Vector4(colourValue.ptr())), Operand::OPS_IN);
+        {
+            curFuncInvocation->pushOperand(ParameterFactory::createConstParam(Vector4((Real)colourValue.r,
+                                                                                      (Real)colourValue.g,
+                                                                                      (Real)colourValue.b,
+                                                                                      (Real)colourValue.a)),
+                                           Operand::OPS_IN);
         }
         
         curFuncInvocation->pushOperand(arg, Operand::OPS_OUT);