This commit is contained in:
lizzie 2026-05-06 01:03:48 +00:00
parent 2389166618
commit 324f3d0c74

View file

@ -1046,8 +1046,8 @@ bool GRenderWindow::LoadOpenGL() {
auto context = CreateSharedContext();
auto scope = context->Acquire();
if (!gladLoadGL()) {
QMessageBox::warning(
this, tr("Error while initializing OpenGL!"),
QtCommon::Frontend::Warning(
tr("Error while initializing OpenGL!"),
tr("Your GPU may not support OpenGL, or you do not have the latest graphics driver."));
return false;
}
@ -1056,15 +1056,16 @@ bool GRenderWindow::LoadOpenGL() {
const QString renderer =
QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER)));
if (!GLAD_GL_VERSION_4_6) {
QMessageBox::warning(this, tr("Error while initializing OpenGL 4.6!"),
tr("Your GPU may not support OpenGL 4.6, or you do not have the "
"latest graphics driver.<br><br>GL Renderer:<br>%1")
.arg(renderer));
QtCommon::Frontend::Warning(
tr("Error while initializing OpenGL 4.6!"),
tr("Your GPU may not support OpenGL 4.6, or you do not have the "
"latest graphics driver.<br><br>GL Renderer:<br>%1")
.arg(renderer));
return false;
}
if (QStringList missing_ext = GetUnsupportedGLExtensions(); !missing_ext.empty()) {
QMessageBox::warning(
this, tr("Error while initializing OpenGL!"),
QtCommon::Frontend::Warning(
tr("Error while initializing OpenGL!"),
tr("Your GPU may not support one or more required OpenGL extensions. Please ensure you "
"have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported "
"extensions:<br>%2")
@ -1074,8 +1075,8 @@ bool GRenderWindow::LoadOpenGL() {
}
return true;
#else
QMessageBox::warning(
this, tr("Error while initializing OpenGL!"),
QtCommon::Frontend::Warning(
tr("Error while initializing OpenGL!"),
tr("This build doesn't have OpenGL support."));
return false;
#endif