summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar Emmanuel Gil Peyrot2016-03-19 01:31:01 +0000
committerGravatar Emmanuel Gil Peyrot2016-05-06 03:10:14 +0100
commitaa4d4ff23c92340baa1771a7d7308d1d91d3b655 (patch)
treedad47959f5af525e0ddce44847a6e31fae510358 /src/video_core
parentMerge pull request #1762 from bunnei/global (diff)
downloadyuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.tar.gz
yuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.tar.xz
yuzu-aa4d4ff23c92340baa1771a7d7308d1d91d3b655.zip
Frontends, VideoCore: Move glad initialisation to the frontend
On SDL2 this allows it to use SDL_GL_GetProcAddress() instead of the default function loader, and fixes a crash when using apitrace with an EGL context. On Qt we will need to migrate from QGLWidget to QOpenGLWidget and QOpenGLContext before we can use gladLoadGLLoader() instead of gladLoadGL(), since the former doesn’t expose a function loader.
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 0e9a0be8b..7fcd36409 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -473,12 +473,6 @@ static void DebugHandler(GLenum source, GLenum type, GLuint id, GLenum severity,
473bool RendererOpenGL::Init() { 473bool RendererOpenGL::Init() {
474 render_window->MakeCurrent(); 474 render_window->MakeCurrent();
475 475
476 // TODO: Make frontends initialize this, so they can use gladLoadGLLoader with their own loaders
477 if (!gladLoadGL()) {
478 LOG_CRITICAL(Render_OpenGL, "Failed to initialize GL functions! Exiting...");
479 exit(-1);
480 }
481
482 if (GLAD_GL_KHR_debug) { 476 if (GLAD_GL_KHR_debug) {
483 glEnable(GL_DEBUG_OUTPUT); 477 glEnable(GL_DEBUG_OUTPUT);
484 glDebugMessageCallback(DebugHandler, nullptr); 478 glDebugMessageCallback(DebugHandler, nullptr);