-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
27 lines (21 loc) · 688 Bytes
/
Copy pathmain.cpp
File metadata and controls
27 lines (21 loc) · 688 Bytes
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
#include <QApplication>
#include <QSurfaceFormat>
#include "camerawidget.h"
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
QSurfaceFormat format;
format.setRenderableType(QSurfaceFormat::OpenGL);
format.setProfile(QSurfaceFormat::CoreProfile);
// format.setProfile(QSurfaceFormat::CompatibilityProfile);
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
format.setDepthBufferSize(10);
format.setMajorVersion(4);
format.setMinorVersion(1);
QSurfaceFormat::setDefaultFormat(format);
qDebug() << format.defaultFormat();
qDebug() << MODEL_DIR;
CameraWidget cw(nullptr);
cw.show();
return app.exec();
}