mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-17 01:58:19 -05:00
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.
This commit is contained in:
@ -473,12 +473,6 @@ static void DebugHandler(GLenum source, GLenum type, GLuint id, GLenum severity,
|
||||
bool RendererOpenGL::Init() {
|
||||
render_window->MakeCurrent();
|
||||
|
||||
// TODO: Make frontends initialize this, so they can use gladLoadGLLoader with their own loaders
|
||||
if (!gladLoadGL()) {
|
||||
LOG_CRITICAL(Render_OpenGL, "Failed to initialize GL functions! Exiting...");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (GLAD_GL_KHR_debug) {
|
||||
glEnable(GL_DEBUG_OUTPUT);
|
||||
glDebugMessageCallback(DebugHandler, nullptr);
|
||||
|
Reference in New Issue
Block a user