fix: allow disabling gl and vulkan features with an envvar and disable it by default on appimage/portable

the previous approach didn't work with runtime symbol lookup errors

Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
This commit is contained in:
DioEgizio 2026-03-20 15:31:34 +01:00
parent 348907f7d1
commit e524fa5b6b
4 changed files with 19 additions and 0 deletions

View file

@ -20,6 +20,7 @@
#include <QMouseEvent>
#include <QOpenGLBuffer>
#include <QProcessEnvironment>
#include <QVector2D>
#include <QVector3D>
#include <QtMath>
@ -330,6 +331,10 @@ void SkinOpenGLWindow::setElytraVisible(bool visible)
bool SkinOpenGLWindow::hasOpenGL()
{
if (!QProcessEnvironment::systemEnvironment().value(QStringLiteral("LAUNCHER_DISABLE_GLVULKAN")).isEmpty()) {
return false;
}
QOpenGLContext ctx;
return ctx.create();
}