aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorTobias C. Berner <tcberner@FreeBSD.org>2018-02-18 08:19:33 +0000
committerTobias C. Berner <tcberner@FreeBSD.org>2018-02-18 08:19:33 +0000
commit7c75097c046cc7089fdc59a758ed82ccabbdf2b4 (patch)
tree55c1de0ac834234921faaa3471220ae4218730db /math
parentc456a2d6ed1d730098d2fc415a4ae6faedcf57c5 (diff)
downloadports-7c75097c046cc7089fdc59a758ed82ccabbdf2b4.tar.gz
ports-7c75097c046cc7089fdc59a758ed82ccabbdf2b4.zip
Notes
Diffstat (limited to 'math')
-rw-r--r--math/qwtplot3d-qt4/files/patch-src_qwt3d__lighting.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/math/qwtplot3d-qt4/files/patch-src_qwt3d__lighting.cpp b/math/qwtplot3d-qt4/files/patch-src_qwt3d__lighting.cpp
new file mode 100644
index 000000000000..475f4f97d6d4
--- /dev/null
+++ b/math/qwtplot3d-qt4/files/patch-src_qwt3d__lighting.cpp
@@ -0,0 +1,18 @@
+src/qwt3d_lighting.cpp:178:27: error: non-constant-expression cannot be narrowed from type 'double' to
+'GLfloat' (aka 'float') in initializer list [-Wc++11-narrowing]
+ GLfloat lightPos[4] = { lights_[light].shift.x, lights_[light].shift.y, lights_[light].shift.z, 1.0};
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/qwt3d_lighting.cpp:178:27: note: insert an explicit cast to silence this issue
+
+
+--- src/qwt3d_lighting.cpp.orig 2018-02-17 23:11:11 UTC
++++ src/qwt3d_lighting.cpp
+@@ -175,7 +175,7 @@ void Plot3D::applyLight(unsigned light)
+ glRotatef( lights_[light].rot.x-90, 1.0, 0.0, 0.0 );
+ glRotatef( lights_[light].rot.y , 0.0, 1.0, 0.0 );
+ glRotatef( lights_[light].rot.z , 0.0, 0.0, 1.0 );
+- GLfloat lightPos[4] = { lights_[light].shift.x, lights_[light].shift.y, lights_[light].shift.z, 1.0};
++ GLfloat lightPos[4] = { static_cast<GLfloat>(lights_[light].shift.x), static_cast<GLfloat>(lights_[light].shift.y), static_cast<GLfloat>(lights_[light].shift.z), 1.0};
+ GLenum le = lightEnum(light);
+ glLightfv(le, GL_POSITION, lightPos);
+ }