-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
executable file
·36 lines (27 loc) · 793 Bytes
/
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
#include <QApplication>
#include <QLabel>
#include <QSurfaceFormat>
#ifndef QT_NO_OPENGL
#include "mainwidget.h"
#endif
#include "utils/utils.h"
int main(int argc, char *argv[]){
QApplication app(argc, argv);
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setSwapInterval(0); // vsync
QSurfaceFormat::setDefaultFormat(format);
app.setApplicationName("Orbal Engine");
app.setApplicationVersion("0.1");
LOG << "Executable path:" << QApplication::arguments()[0];
LOG << "Inputs:" << QApplication::arguments();
#ifndef QT_NO_OPENGL
MainWidget widget;
widget.resize(1280,720);
widget.show();
#else
QLabel note("OpenGL Support required");
note.show();
#endif
return app.exec();
}