16int main(
int argc,
char *argv[]) {
24 qputenv(
"QSG_RENDER_LOOP",
"threaded");
25 qputenv(
"QML_DISK_CACHE",
"aot");
27 const QMapLibre::RendererType rendererType = QMapLibre::supportedRendererType();
28 const auto graphicsApi =
static_cast<QSGRendererInterface::GraphicsApi
>(rendererType);
29 QQuickWindow::setGraphicsApi(graphicsApi);
31 if (graphicsApi == QSGRendererInterface::OpenGLRhi) {
32 QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
33 QSurfaceFormat format;
34 format.setProfile(QSurfaceFormat::CoreProfile);
35 format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
36 format.setSwapInterval(0);
37 format.setDepthBufferSize(24);
38 format.setStencilBufferSize(8);
39 format.setOption(QSurfaceFormat::DeprecatedFunctions,
false);
40 format.setOption(QSurfaceFormat::DebugContext,
false);
41 QSurfaceFormat::setDefaultFormat(format);
49 QQuickStyle::setStyle(
"Universal");
51 app.installEventFilter(&app);
56 QObject::connect(&app, &QGuiApplication::aboutToQuit, [entryPoint] { entryPoint->deleteLater(); });
58 return Application::exec();
Application initialization orchestrator.
Application entry point and initialization orchestrator.
int main(int argc, char *argv[])
void SigintCallbackHandler(int signum)