From 45a967b3cdd85e38fdc5ddf1f85f8c11cb3609f8 Mon Sep 17 00:00:00 2001
From: Ancurio <amaryllis.kulla@protonmail.com>
Date: Wed, 6 Oct 2021 23:42:40 +0200
Subject: [PATCH] GlFunctions: Add driver info to error message

---
 src/gl-fun.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/gl-fun.cpp b/src/gl-fun.cpp
index a53b6c2..a26419f 100644
--- a/src/gl-fun.cpp
+++ b/src/gl-fun.cpp
@@ -99,7 +99,14 @@ void initGLFunctions()
 	int glMajor = *ver - '0';
 
 	if (glMajor < 2)
-		throw EXC("At least OpenGL (ES) 2.0 is required");
+	{
+		throw Exception(Exception::MKXPError,
+		                "At least OpenGL (ES) 2.0 is required\n\nDriver:\n%s\n%s\n%s\n%s",
+		                gl.GetString(GL_VENDOR),
+		                gl.GetString(GL_RENDERER),
+		                gl.GetString(GL_VERSION),
+		                gl.GetString(GL_SHADING_LANGUAGE_VERSION));
+	}
 
 	if (gles)
 	{