|
|
@ -5,7 +5,13 @@ |
|
|
|
int main(int argc, char *argv[]) |
|
|
|
int main(int argc, char *argv[]) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QSurfaceFormat fmt; |
|
|
|
QSurfaceFormat fmt; |
|
|
|
|
|
|
|
#ifdef __APPLE__ |
|
|
|
|
|
|
|
fmt.setVersion(3, 2); |
|
|
|
|
|
|
|
fmt.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile); |
|
|
|
|
|
|
|
fmt.setRenderableType(QSurfaceFormat::OpenGL); |
|
|
|
|
|
|
|
#else |
|
|
|
fmt.setRenderableType(QSurfaceFormat::OpenGLES); |
|
|
|
fmt.setRenderableType(QSurfaceFormat::OpenGLES); |
|
|
|
|
|
|
|
#endif |
|
|
|
QSurfaceFormat::setDefaultFormat(fmt); |
|
|
|
QSurfaceFormat::setDefaultFormat(fmt); |
|
|
|
|
|
|
|
|
|
|
|
QApplication a(argc, argv); |
|
|
|
QApplication a(argc, argv); |
|
|
|