mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-14 05:42:13 +08:00
35155d5efa
* fix shader version * fix texture buffer size * Attribute/Varying is deprecated old-commit-hash: 42b6292fa5220ca979b0354de91aa16d2cf54039
28 lines
531 B
C++
28 lines
531 B
C++
#include <QApplication>
|
|
|
|
#include "window.hpp"
|
|
|
|
int main(int argc, char *argv[]) {
|
|
QSurfaceFormat fmt;
|
|
#ifdef __APPLE__
|
|
fmt.setVersion(3, 2);
|
|
fmt.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile);
|
|
fmt.setRenderableType(QSurfaceFormat::OpenGL);
|
|
#else
|
|
fmt.setRenderableType(QSurfaceFormat::OpenGLES);
|
|
#endif
|
|
QSurfaceFormat::setDefaultFormat(fmt);
|
|
|
|
QApplication a(argc, argv);
|
|
|
|
MainWindow w;
|
|
#ifdef QCOM2
|
|
w.showFullScreen();
|
|
#else
|
|
w.setFixedSize(vwp_w, vwp_h);
|
|
w.show();
|
|
#endif
|
|
|
|
return a.exec();
|
|
}
|