From 4df57a722e3e226ed9fbe5504edf79e30d4ccb13 Mon Sep 17 00:00:00 2001 From: loki Date: Sun, 6 Jun 2021 17:19:11 +0200 Subject: [PATCH] Grab whatever function we can --- glad/src/gl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glad/src/gl.c b/glad/src/gl.c index 29e57567..a3989cf6 100644 --- a/glad/src/gl.c +++ b/glad/src/gl.c @@ -1270,6 +1270,10 @@ static int glad_gl_find_core_gl(GladGLContext *context) { GLAD_IMPL_UTIL_SSCANF(version, "%d.%d", &major, &minor); + // attempt to grab whatever we can + int temp = major; + major = 5; + context->VERSION_1_0 = (major == 1 && minor >= 0) || major > 1; context->VERSION_1_1 = (major == 1 && minor >= 1) || major > 1; context->VERSION_1_2 = (major == 1 && minor >= 2) || major > 1; @@ -1290,6 +1294,7 @@ static int glad_gl_find_core_gl(GladGLContext *context) { context->VERSION_4_5 = (major == 4 && minor >= 5) || major > 4; context->VERSION_4_6 = (major == 4 && minor >= 6) || major > 4; + major = temp; return GLAD_MAKE_VERSION(major, minor); }