forked from dmgaldi/Procedurally-Generated-Terrain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
36 lines (31 loc) · 863 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/****************************************************************************
**
Main for OpenGL in QT.
Start code for CMSC 427, Spring 2015
Reference: cube & texture example in Qt Creator
author: Zheng Xu, [email protected]
**
****************************************************************************/
#ifndef QT_NO_OPENGL
#include "mywidget.h"
#endif
#include <QApplication>
#include <QSurfaceFormat>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setVersion(3, 3);
format.setProfile(QSurfaceFormat::CoreProfile);
QSurfaceFormat::setDefaultFormat(format);
app.setApplicationName("Car 101");
#ifndef QT_NO_OPENGL
MyWidget myW;
myW.show();
#else
QLabel note("OpenGL Support required");
note.show();
#endif
return app.exec();
}