2020-05-30 04:37:06 +00:00
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2020-06-04 03:39:16 +00:00
|
|
|
// "Calling QSurfaceFormat::setDefaultFormat() before constructing the
|
|
|
|
// QApplication instance is mandatory on some platforms ... when an
|
|
|
|
// OpenGL core profile context is requested."
|
|
|
|
QSurfaceFormat format;
|
|
|
|
format.setVersion(3, 2);
|
|
|
|
format.setProfile(QSurfaceFormat::CoreProfile);
|
|
|
|
format.setDepthBufferSize(0);
|
|
|
|
format.setStencilBufferSize(0);
|
|
|
|
QSurfaceFormat::setDefaultFormat(format);
|
|
|
|
|
2020-06-17 03:15:47 +00:00
|
|
|
// TODO: something with QCommandLineParser to accept a file to launch.
|
|
|
|
|
2020-06-01 03:39:08 +00:00
|
|
|
QApplication a(argc, argv);
|
2020-06-23 00:32:44 +00:00
|
|
|
|
|
|
|
MainWindow *w = new MainWindow();
|
|
|
|
w->setAttribute(Qt::WA_DeleteOnClose);
|
|
|
|
w->show();
|
|
|
|
|
2020-06-01 03:39:08 +00:00
|
|
|
return a.exec();
|
2020-05-30 04:37:06 +00:00
|
|
|
}
|