forked from imagina-gmin317-2015/tp7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
65 lines (49 loc) · 1.29 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "gamewindow.h"
#include "mytcpserver.h"
#include <QtGui/QGuiApplication>
#include <QtGui/QMatrix4x4>
#include <QtGui/QOpenGLShaderProgram>
#include <QtGui/QScreen>
#include <QtCore/qmath.h>
#include <QMouseEvent>
#include <QKeyEvent>
#include <time.h>
#include <sys/time.h>
#include <iostream>
#include <QtCore>
#include <QtGui>
using namespace std;
int main(int argc, char **argv)
{
srand(time(NULL));
QGuiApplication app(argc, argv);
QSurfaceFormat format;
format.setSamples(16);
MyTcpServer* tcpServer = new MyTcpServer();
tcpServer->start(10000);
GameWindow window0(40);
window0.setFormat(format);
window0.resize(500,375);
window0.setPosition(0,0);
window0.show();
/*GameWindow window1(40);
window1.setFormat(format);
window1.resize(500,375);
window1.setPosition(800,50);
window1.show();
GameWindow window2(40);
window2.setFormat(format);
window2.resize(500,375);
window2.setPosition(50,400);
window2.show();
GameWindow window3(40);
window3.setFormat(format);
window3.resize(500,375);
window3.setPosition(800,400);
window3.show();*/
window0.setAnimating(true);
/*window1.setAnimating(true);
window2.setAnimating(true);
window3.setAnimating(true);*/
return app.exec();
}