1 |
johu 13/11/30 20:33:37 |
2 |
|
3 |
Added: analitza-4.11.3-arm.patch |
4 |
Log: |
5 |
Add upstream patch to fix compile on arm spotted by Michael Palimaka <kensington@g.o>, bug #492940. |
6 |
|
7 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key F3CFD2BD) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 kde-base/analitza/files/analitza-4.11.3-arm.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/analitza/files/analitza-4.11.3-arm.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/analitza/files/analitza-4.11.3-arm.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: analitza-4.11.3-arm.patch |
16 |
=================================================================== |
17 |
commit 07dc31770db7a7d2e5273db0c2b32578a7e13c4e |
18 |
Author: Maximiliano Curia <maxy@××××××.org> |
19 |
Date: Wed Oct 30 23:53:19 2013 +0100 |
20 |
|
21 |
Fix compile in armhf |
22 |
|
23 |
Acked by Aleix |
24 |
REVIEW: 111121 |
25 |
BUGS: 321244 |
26 |
|
27 |
diff --git a/analitzaplot/plotter3d.cpp b/analitzaplot/plotter3d.cpp |
28 |
index accac1a..476b31a 100644 |
29 |
--- a/analitzaplot/plotter3d.cpp |
30 |
+++ b/analitzaplot/plotter3d.cpp |
31 |
@@ -143,6 +143,10 @@ void Plotter3D::setViewport(const QRectF& vp) |
32 |
renderGL(); |
33 |
} |
34 |
|
35 |
+// add overloaded functions which call the underlying OpenGL function |
36 |
+inline void glMultMatrix(const GLfloat *m) { glMultMatrixf(m); } |
37 |
+inline void glMultMatrix(const GLdouble *m) { glMultMatrixd(m); } |
38 |
+ |
39 |
void Plotter3D::drawPlots() |
40 |
{ |
41 |
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); |
42 |
@@ -153,7 +157,7 @@ void Plotter3D::drawPlots() |
43 |
|
44 |
glMatrixMode(GL_MODELVIEW); |
45 |
glLoadIdentity(); |
46 |
- glMultMatrixd(m_rot.data()); |
47 |
+ glMultMatrix(m_rot.constData()); |
48 |
|
49 |
// Object Drawing : |
50 |
glCallList(m_sceneObjects.value(Axes)); |
51 |
@@ -398,6 +402,14 @@ void Plotter3D::scale(GLdouble factor) |
52 |
renderGL(); |
53 |
} |
54 |
|
55 |
+inline QMatrix4x4 get_matrix(GLfloat *m) |
56 |
+{ |
57 |
+ return QMatrix4x4(m[0], m[1], m[2], m[3], |
58 |
+ m[4], m[5], m[6], m[7], |
59 |
+ m[8], m[9], m[10], m[11], |
60 |
+ m[12], m[13], m[14], m[15]); |
61 |
+} |
62 |
+ |
63 |
void Plotter3D::rotate(int dx, int dy) |
64 |
{ |
65 |
GLdouble ax = -dy; |
66 |
@@ -412,11 +424,11 @@ void Plotter3D::rotate(int dx, int dy) |
67 |
m_rot.rotate(angle, m_rotFixed.normalized()); |
68 |
renderGL(); |
69 |
} else { |
70 |
- GLdouble matrix[16] = {0}; // model view matrix from current OpenGL state |
71 |
+ GLfloat matrix[16] = {0}; // model view matrix from current OpenGL state |
72 |
|
73 |
- glGetDoublev(GL_MODELVIEW_MATRIX, matrix); |
74 |
+ glGetFloatv(GL_MODELVIEW_MATRIX, matrix); |
75 |
|
76 |
- QMatrix4x4 matrix4(matrix); |
77 |
+ QMatrix4x4 matrix4(get_matrix(matrix)); |
78 |
bool couldInvert; |
79 |
matrix4 = matrix4.inverted(&couldInvert); |