From 83c56c0263ac01250a92d07db7fff00a0fbb70f2 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 30 Sep 2021 17:12:18 -0700 Subject: [PATCH] opengl: show driver version info --- app/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/main.cpp b/app/main.cpp index 5bba4dc69..0898932a0 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -46,6 +46,7 @@ extern "C" { #ifdef _WIN32 #include #include +#include #include #endif @@ -224,6 +225,9 @@ int main(int argc, char *argv[]) surface.create(); ctx.makeCurrent(&surface); bool has_proc_address = wglGetProcAddress("glGenFramebuffers"); + std::string gpu_vendor = reinterpret_cast(ctx.functions()->glGetString(GL_VENDOR)); + std::string gpu_renderer = reinterpret_cast(ctx.functions()->glGetString(GL_RENDERER)); + std::string gpu_version = reinterpret_cast(ctx.functions()->glGetString(GL_VERSION)); ctx.doneCurrent(); surface.destroy(); @@ -231,7 +235,8 @@ int main(int argc, char *argv[]) QString msg = QCoreApplication::translate("main", "Your computer's graphics driver does not appear to support framebuffers. " "This means either your graphics driver is not up-to-date or your graphics card is too old to run Olive.\n\n" - "Please update your graphics driver to the latest version and try again."); + "Please update your graphics driver to the latest version and try again.\n\n" + "Current driver information: %1 %2 %3").arg(QString::fromStdString(gpu_vendor), QString::fromStdString(gpu_renderer), QString::fromStdString(gpu_version)); if (dynamic_cast(a.get())) { QMessageBox::critical(nullptr, QString(), msg);