ref: faa96094b4ef9954741493fe0d180e7039d6ba4a
parent: 54189c598de093fe2ac2424c3d53d175f2d7437d
author: Clownacy <Clownacy@users.noreply.github.com>
date: Fri Jan 17 05:25:18 EST 2020
Use SDL's GetProcAddress function for OpenGL Also added extra sanity checks
--- a/src/Backends/Rendering/OpenGL3.cpp
+++ b/src/Backends/Rendering/OpenGL3.cpp
@@ -288,7 +288,13 @@
context = SDL_GL_CreateContext(window);
- if (!gladLoadGL())
+ if (context == NULL)
+ return NULL;
+
+ if (SDL_GL_MakeCurrent(window, context) < 0)
+ return NULL;
+
+ if (!gladLoadGLLoader((GLADloadproc)SDL_GL_GetProcAddress))
return NULL;
// Check if the platform supports OpenGL 3.2
--
⑨