From 934989e1ede1d324fd552313a462f0de29bfb318 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Thu, 11 Jun 2026 20:25:55 -0700 Subject: [PATCH] Delay GL context initialization on ios. I think it needs to have the widgets created for it to work. --- common/lc_application.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/lc_application.cpp b/common/lc_application.cpp index 9f8ef31a..efdb15bf 100644 --- a/common/lc_application.cpp +++ b/common/lc_application.cpp @@ -937,11 +937,13 @@ lcStartupMode lcApplication::Initialize(const QList>& Libra if (Options.Exit) return lcStartupMode::Success; +#ifndef Q_OS_IOS if (!lcContext::InitializeRenderer()) { StdErr << tr("Error creating OpenGL context.\n"); return lcStartupMode::Error; } +#endif const bool SaveAndExit = (Options.SaveImage || Options.SaveWavefront || Options.Save3DS || Options.SaveCOLLADA || Options.SaveCSV || Options.SaveHTML); @@ -1250,6 +1252,15 @@ lcStartupMode lcApplication::Initialize(const QList>& Libra gMainWindow->SetColorIndex(lcGetColorIndex(7)); gMainWindow->GetPartSelectionWidget()->SetDefaultPart(); gMainWindow->UpdateRecentFiles(); + +#ifdef Q_OS_IOS + if (!lcContext::InitializeRenderer()) + { + StdErr << tr("Error creating OpenGL context.\n"); + return lcStartupMode::Error; + } +#endif + gMainWindow->show(); #ifdef Q_OS_WIN