Browse Source

Fix for mac

develop
Pierre-Antoine 'ZHAJOR' Tible 7 years ago
parent
commit
5a3bedbd10

+ 5
- 0
TheGame/TheGame.pro View File

24
 
24
 
25
 FORMS    += mainwindow.ui
25
 FORMS    += mainwindow.ui
26
 
26
 
27
+unix:!macx {
27
 LIBS += -lGLU
28
 LIBS += -lGLU
29
+}
30
+macx:{
31
+LIBS += -framework OpenGL
32
+}
28
 
33
 
29
 win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../UGameEngine/release/ -lUGameEngine
34
 win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../UGameEngine/release/ -lUGameEngine
30
 else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../UGameEngine/debug/ -lUGameEngine
35
 else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../UGameEngine/debug/ -lUGameEngine

+ 7
- 2
TheGame/openglrenderdevice.cpp View File

1
 #include "openglrenderdevice.h"
1
 #include "openglrenderdevice.h"
2
 #include <QRgb>
2
 #include <QRgb>
3
-#include "GL/gl.h"
4
-#include "GL/glu.h"
3
+#ifdef __APPLE__
4
+#include <OpenGL/gl.h>
5
+#include <OpenGL/glu.h>
6
+#else
7
+#include <GL/gl.h>
8
+#include <GL/glu.h>
9
+#endif
5
 
10
 
6
 OpenGLRenderDevice::OpenGLRenderDevice(QObject *parent)
11
 OpenGLRenderDevice::OpenGLRenderDevice(QObject *parent)
7
     : AbstractRenderDevice(parent)
12
     : AbstractRenderDevice(parent)

+ 7
- 1
UGameEngine/UGameEngine.pro View File

57
 
57
 
58
 # FLEX && BISON
58
 # FLEX && BISON
59
 
59
 
60
-LIBS += -lfl -ly
60
+LIBS += -ly
61
+unix:!macx {
62
+LIBS += -lfl
63
+}
64
+macx:{
65
+LIBS += -ll
66
+}
61
 
67
 
62
 FLEXSOURCES = utils/lexer-wavefront-obj.l \
68
 FLEXSOURCES = utils/lexer-wavefront-obj.l \
63
     utils/lexer-wavefront-mtl.l
69
     utils/lexer-wavefront-mtl.l

+ 5
- 5
UGameEngine/utils/matrixmxn.hxx View File

51
 {
51
 {
52
     for (int i = 0; i < M; ++i) {
52
     for (int i = 0; i < M; ++i) {
53
         for (int j = 0; j < N; ++j) {
53
         for (int j = 0; j < N; ++j) {
54
-            if (_scalars[i][j] != other._scalars[i][j]) {
54
+            if (_scalars[i][j] != other.getScalar(i, j)) {
55
                 return false;
55
                 return false;
56
             }
56
             }
57
         }
57
         }
103
 {
103
 {
104
     for (int i = 0; i < M; ++i) {
104
     for (int i = 0; i < M; ++i) {
105
         for (int j = 0; j < N; ++j) {
105
         for (int j = 0; j < N; ++j) {
106
-            _scalars[i][j] += other._scalars[i][j];
106
+            _scalars[i][j] += other.getScalar(i, j);
107
         }
107
         }
108
     }
108
     }
109
     return *getThis();
109
     return *getThis();
123
 {
123
 {
124
     for (int i = 0; i < M; ++i) {
124
     for (int i = 0; i < M; ++i) {
125
         for (int j = 0; j < N; ++j) {
125
         for (int j = 0; j < N; ++j) {
126
-            _scalars[i][j] -= other._scalars[i][j];
126
+            _scalars[i][j] -= other.getScalar(i, j);
127
         }
127
         }
128
     }
128
     }
129
     return *getThis();
129
     return *getThis();
148
 {
148
 {
149
     for (int i = 0; i < M; ++i) {
149
     for (int i = 0; i < M; ++i) {
150
         for (int j = 0; j < N; ++j) {
150
         for (int j = 0; j < N; ++j) {
151
-            _scalars[i][j] *= other._scalars[i][j];
151
+            _scalars[i][j] *= other.getScalar(i, j);
152
         }
152
         }
153
     }
153
     }
154
     return *getThis();
154
     return *getThis();
190
 {
190
 {
191
     for (int i = 0; i < M; ++i) {
191
     for (int i = 0; i < M; ++i) {
192
         for (int j = 0; j < N; ++j) {
192
         for (int j = 0; j < N; ++j) {
193
-            _scalars[i][j] /= other._scalars[i][j];
193
+            _scalars[i][j] /= other.getScalar(i, j);
194
         }
194
         }
195
     }
195
     }
196
     return *getThis();
196
     return *getThis();

Loading…
Cancel
Save