feat(src/main.cpp): supports opengl render on mac

This commit is contained in:
Ronan Abhamon 2017-03-16 16:49:18 +01:00
parent a105095fb0
commit eb6e28c2e3

View file

@ -30,12 +30,8 @@ using namespace std;
// =============================================================================
int main (int argc, char *argv[]) {
// Force OpenGLES & shader version 2.0.
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES, true);
QSurfaceFormat fmt;
fmt.setVersion(2, 0);
QSurfaceFormat::setDefaultFormat(fmt);
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL, true);
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
App app(argc, argv);
app.parseArgs();