You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
595 B
27 lines
595 B
5 years ago
|
#include <QApplication>
|
||
|
|
||
4 years ago
|
#include "qt/window.hpp"
|
||
|
#include "qt/qt_window.hpp"
|
||
5 years ago
|
|
||
5 years ago
|
int main(int argc, char *argv[]) {
|
||
5 years ago
|
QSurfaceFormat fmt;
|
||
5 years ago
|
#ifdef __APPLE__
|
||
|
fmt.setVersion(3, 2);
|
||
|
fmt.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile);
|
||
|
fmt.setRenderableType(QSurfaceFormat::OpenGL);
|
||
|
#else
|
||
5 years ago
|
fmt.setRenderableType(QSurfaceFormat::OpenGLES);
|
||
5 years ago
|
#endif
|
||
5 years ago
|
QSurfaceFormat::setDefaultFormat(fmt);
|
||
|
|
||
4 years ago
|
#ifdef QCOM
|
||
|
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||
|
#endif
|
||
|
|
||
5 years ago
|
QApplication a(argc, argv);
|
||
|
MainWindow w;
|
||
4 years ago
|
setMainWindow(&w);
|
||
4 years ago
|
a.installEventFilter(&w);
|
||
5 years ago
|
return a.exec();
|
||
|
}
|