1 #include <QApplication>
2 #include <QDesktopWidget>
3 #include <QSurfaceFormat>
4 #include <QtGui/QOpenGLContext>
6 #include "mainwindow.h"
9 int main(int argc, char *argv[])
11 setenv("QT_XCB_GL_INTEGRATION", "xcb_egl", 0);
13 QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
14 QApplication app(argc, argv);
17 fmt.setDepthBufferSize(0);
18 fmt.setStencilBufferSize(0);
19 fmt.setProfile(QSurfaceFormat::CoreProfile);
20 fmt.setMajorVersion(3);
21 fmt.setMinorVersion(1);
22 QSurfaceFormat::setDefaultFormat(fmt);
24 MainWindow mainWindow;
25 mainWindow.resize(QSize(1280, 720));