-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
35 lines (28 loc) · 923 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
#include "mainwindow.h"
#include <QApplication>
#include <QSurfaceFormat>
#include "d_format.hpp"
Q_DECLARE_METATYPE(Obj)
Q_DECLARE_METATYPE(SObj)
Q_DECLARE_METATYPE(std::shared_ptr<Frame>)
Q_DECLARE_METATYPE(P)
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QCoreApplication::setOrganizationName("ud1 soft");
QCoreApplication::setOrganizationDomain("https://github.com/ud1");
QCoreApplication::setApplicationName("ud1 viewer");
qRegisterMetaType<Obj>("Obj");
qRegisterMetaType<SObj>("SObj");
qRegisterMetaType<std::shared_ptr<Frame>>("FramePtr");
qRegisterMetaType<P>("P");
qRegisterMetaType<std::string>("std::string");
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setVersion(3, 2);
format.setProfile(QSurfaceFormat::CoreProfile);
QSurfaceFormat::setDefaultFormat(format);
RefsView w;
w.show();
return a.exec();
}