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);
19 QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
20 QApplication app(argc, argv);
23 fmt.setDepthBufferSize(0);
24 fmt.setStencilBufferSize(0);
25 fmt.setProfile(QSurfaceFormat::CoreProfile);
26 fmt.setMajorVersion(3);
27 fmt.setMinorVersion(1);
28 QSurfaceFormat::setDefaultFormat(fmt);
30 QGLFormat::setDefaultFormat(QGLFormat::fromSurfaceFormat(fmt));
32 global_share_widget = new QGLWidget();
34 MainWindow mainWindow;
35 mainWindow.resize(QSize(1500, 670));