author | nemo |
Wed, 05 Dec 2018 09:50:25 -0500 | |
branch | 0.9.25 |
changeset 14373 | c2a3d15df7d3 |
parent 14295 | 92e5682810d4 |
child 14377 | b6824a53d4b1 |
permissions | -rw-r--r-- |
14159
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
1 |
#ifndef ENGINEINSTANCE_H |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
2 |
#define ENGINEINSTANCE_H |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
3 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
4 |
#include "engine_interface.h" |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
5 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
6 |
#include <QObject> |
14295
92e5682810d4
Prepare to have possibility to pass opengl context to engine
unc0rr
parents:
14276
diff
changeset
|
7 |
#include <QOpenGLContext> |
14159
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
8 |
|
14276
1aac8a62be6f
Implement send_ipc and read_ipc in engine lib, send_ipc in frontend
unC0Rr
parents:
14159
diff
changeset
|
9 |
#include "game_config.h" |
1aac8a62be6f
Implement send_ipc and read_ipc in engine lib, send_ipc in frontend
unC0Rr
parents:
14159
diff
changeset
|
10 |
|
14159
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
11 |
class EngineInstance : public QObject { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
12 |
Q_OBJECT |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
13 |
public: |
14295
92e5682810d4
Prepare to have possibility to pass opengl context to engine
unc0rr
parents:
14276
diff
changeset
|
14 |
explicit EngineInstance(QObject* parent = nullptr); |
14159
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
15 |
~EngineInstance(); |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
16 |
|
14295
92e5682810d4
Prepare to have possibility to pass opengl context to engine
unc0rr
parents:
14276
diff
changeset
|
17 |
void sendConfig(const GameConfig& config); |
92e5682810d4
Prepare to have possibility to pass opengl context to engine
unc0rr
parents:
14276
diff
changeset
|
18 |
void advance(quint32 ticks); |
92e5682810d4
Prepare to have possibility to pass opengl context to engine
unc0rr
parents:
14276
diff
changeset
|
19 |
void renderFrame(); |
92e5682810d4
Prepare to have possibility to pass opengl context to engine
unc0rr
parents:
14276
diff
changeset
|
20 |
void setOpenGLContext(QOpenGLContext* context); |
14159
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
21 |
Engine::PreviewInfo generatePreview(); |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
22 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
23 |
signals: |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
24 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
25 |
public slots: |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
26 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
27 |
private: |
14295
92e5682810d4
Prepare to have possibility to pass opengl context to engine
unc0rr
parents:
14276
diff
changeset
|
28 |
Engine::EngineInstance* m_instance; |
14159
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
29 |
}; |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
30 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
31 |
#endif // ENGINEINSTANCE_H |