Browse Source

added game engine subproject

develop
Robin Thoni 7 years ago
parent
commit
a1bfb8b9a0

+ 2
- 0
.gitignore View File

@@ -6,4 +6,6 @@ moc_*
6 6
 Makefile
7 7
 
8 8
 *.o
9
+*.so
10
+*.so.*
9 11
 TheGame/TheGame

+ 7
- 0
TheGame/TheGame.pro View File

@@ -22,3 +22,10 @@ HEADERS  += mainwindow.h \
22 22
 FORMS    += mainwindow.ui
23 23
 
24 24
 LIBS += -lGLU
25
+
26
+win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../UGameEngine/release/ -lUGameEngine
27
+else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../UGameEngine/debug/ -lUGameEngine
28
+else:unix: LIBS += -L$$OUT_PWD/../UGameEngine/ -lUGameEngine
29
+
30
+INCLUDEPATH += $$PWD/../UGameEngine
31
+DEPENDPATH += $$PWD/../UGameEngine

+ 2
- 2
TheGame/mainwindow.ui View File

@@ -6,8 +6,8 @@
6 6
    <rect>
7 7
     <x>0</x>
8 8
     <y>0</y>
9
-    <width>400</width>
10
-    <height>300</height>
9
+    <width>415</width>
10
+    <height>311</height>
11 11
    </rect>
12 12
   </property>
13 13
   <property name="windowTitle">

+ 3
- 0
TheGame/renderwidget.h View File

@@ -2,6 +2,7 @@
2 2
 #define RENDERWIDGET_H
3 3
 
4 4
 #include <QGLWidget>
5
+#include "ugameengine.h"
5 6
 
6 7
 class RenderWidget : public QGLWidget
7 8
 {
@@ -26,6 +27,8 @@ private:
26 27
 
27 28
     float _fov;
28 29
 
30
+    QSharedPointer<UGameEngine> _engine;
31
+
29 32
 };
30 33
 
31 34
 #endif // RENDERWIDGET_H

+ 3
- 0
UGameEngine.pro View File

@@ -1,4 +1,7 @@
1 1
 TEMPLATE = subdirs
2 2
 
3
+CONFIG += ordered
4
+
3 5
 SUBDIRS += \
6
+    UGameEngine \
4 7
     TheGame

+ 22
- 0
UGameEngine/UGameEngine.pro View File

@@ -0,0 +1,22 @@
1
+#-------------------------------------------------
2
+#
3
+# Project created by QtCreator 2016-08-31T16:32:08
4
+#
5
+#-------------------------------------------------
6
+
7
+QT       -= gui
8
+
9
+TARGET = UGameEngine
10
+TEMPLATE = lib
11
+
12
+DEFINES += UGAMEENGINE_LIBRARY
13
+
14
+SOURCES += ugameengine.cpp
15
+
16
+HEADERS += ugameengine.h\
17
+        ugameengine_global.h
18
+
19
+unix {
20
+    target.path = /usr/lib
21
+    INSTALLS += target
22
+}

+ 6
- 0
UGameEngine/ugameengine.cpp View File

@@ -0,0 +1,6 @@
1
+#include "ugameengine.h"
2
+
3
+
4
+UGameEngine::UGameEngine()
5
+{
6
+}

+ 13
- 0
UGameEngine/ugameengine.h View File

@@ -0,0 +1,13 @@
1
+#ifndef UGAMEENGINE_H
2
+#define UGAMEENGINE_H
3
+
4
+#include "ugameengine_global.h"
5
+
6
+class UGAMEENGINESHARED_EXPORT UGameEngine
7
+{
8
+
9
+public:
10
+    UGameEngine();
11
+};
12
+
13
+#endif // UGAMEENGINE_H

+ 12
- 0
UGameEngine/ugameengine_global.h View File

@@ -0,0 +1,12 @@
1
+#ifndef UGAMEENGINE_GLOBAL_H
2
+#define UGAMEENGINE_GLOBAL_H
3
+
4
+#include <QtCore/qglobal.h>
5
+
6
+#if defined(UGAMEENGINE_LIBRARY)
7
+#  define UGAMEENGINESHARED_EXPORT Q_DECL_EXPORT
8
+#else
9
+#  define UGAMEENGINESHARED_EXPORT Q_DECL_IMPORT
10
+#endif
11
+
12
+#endif // UGAMEENGINE_GLOBAL_H

Loading…
Cancel
Save