浏览代码

added game engine subproject

develop
Robin Thoni 7 年前
父节点
当前提交
a1bfb8b9a0

+ 2
- 0
.gitignore 查看文件

6
 Makefile
6
 Makefile
7
 
7
 
8
 *.o
8
 *.o
9
+*.so
10
+*.so.*
9
 TheGame/TheGame
11
 TheGame/TheGame

+ 7
- 0
TheGame/TheGame.pro 查看文件

22
 FORMS    += mainwindow.ui
22
 FORMS    += mainwindow.ui
23
 
23
 
24
 LIBS += -lGLU
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 查看文件

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

+ 3
- 0
TheGame/renderwidget.h 查看文件

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

+ 3
- 0
UGameEngine.pro 查看文件

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

+ 22
- 0
UGameEngine/UGameEngine.pro 查看文件

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 查看文件

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

+ 13
- 0
UGameEngine/ugameengine.h 查看文件

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 查看文件

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

正在加载...
取消
保存