-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
91 lines (65 loc) · 1.95 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include <QApplication>
#include "mainwindow.h"
#include "facebuilder.h"
#include "meshbuilder.h"
#include "webcamwidget.h"
#include "glwidget.h"
#include "mesh.h"
int main(int argc, char *argv[])
{
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
QApplication app(argc, argv);
QSurfaceFormat format;
format.setRenderableType(QSurfaceFormat::OpenGL);
format.setProfile(QSurfaceFormat::CoreProfile);
format.setVersion(3,3);
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
QSurfaceFormat::setDefaultFormat(format);
// FACEBUILDER WIDGET
MeshBuilder builder;
builder.resize(1024,768);
builder.show();
// WEBCAM WIDGET
/*
WebcamWidget *web = new WebcamWidget();
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(web);
layout->addItem(web->menu());
QWidget *widget = new QWidget;
widget->setLayout(layout);
widget->resize(640,480);
widget->show();
*/
// WEBCAM WIDGET + DATABASE
/*
FaceDatabaseWidget *db = new FaceDatabaseWidget;
WebcamWidget *web = new WebcamWidget();
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(web);
layout->addItem(web->menu());
QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->addWidget(db->menu());
mainLayout->addItem(layout);
QObject::connect(db,SIGNAL(imageChanged(QString)),web,SLOT(setImage(QString)));
QWidget *widget = new QWidget;
widget->setLayout(mainLayout);
widget->resize(640,480);
widget->show();
*/
// MESH VIEWER WIDGET
/*
Mesh mesh;
GLWidget *meshViewer = new GLWidget;
QHBoxLayout *layout = new QHBoxLayout;
layout->addWidget(meshViewer);
layout->addWidget(meshViewer->displayMenu());
QWidget *widget = new QWidget;
widget->setLayout(layout);
widget->resize(640,480);
widget->show();
mesh.load("yaleB3.mesh");
meshViewer->addMesh("mesh",mesh);
*/
return app.exec();
}