Delay GL context initialization on ios.

I think it needs to have the widgets created for it to work.
This commit is contained in:
Leonardo Zide
2026-06-11 20:25:55 -07:00
parent 357301b3f1
commit 934989e1ed
+11
View File
@@ -937,11 +937,13 @@ lcStartupMode lcApplication::Initialize(const QList<QPair<QString, bool>>& 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<QPair<QString, bool>>& 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