4 #include <QApplication>
5 #include <QCoreApplication>
8 #include <QSurfaceFormat>
11 #include "mainwindow.h"
14 int main(int argc, char *argv[])
16 setenv("QT_XCB_GL_INTEGRATION", "xcb_egl", 0);
18 QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
19 QApplication app(argc, argv);
22 fmt.setDepthBufferSize(0);
23 fmt.setStencilBufferSize(0);
24 fmt.setProfile(QSurfaceFormat::CoreProfile);
25 fmt.setMajorVersion(3);
26 fmt.setMinorVersion(1);
27 QSurfaceFormat::setDefaultFormat(fmt);
29 QGLFormat::setDefaultFormat(QGLFormat::fromSurfaceFormat(fmt));
31 global_share_widget = new QGLWidget();
33 MainWindow mainWindow;
34 mainWindow.resize(QSize(1500, 670));