From 70ba204168b1363b8e7c9e6f207da214b276f9d9 Mon Sep 17 00:00:00 2001
From: offtkp <parisoplop@gmail.com>
Date: Fri, 20 Oct 2023 01:47:37 +0300
Subject: [PATCH] Who put this here

---
 src/panda_sdl/frontend_sdl.cpp | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/src/panda_sdl/frontend_sdl.cpp b/src/panda_sdl/frontend_sdl.cpp
index d1076d9d..29b1dcb8 100644
--- a/src/panda_sdl/frontend_sdl.cpp
+++ b/src/panda_sdl/frontend_sdl.cpp
@@ -2,18 +2,6 @@
 
 #include <glad/gl.h>
 
-void loadGlFunctions(void* (*loadproc)(const char*)) {
-#ifdef __ANDROID__
-	if (!gladLoadGLES2Loader(loadproc)) {
-		Helpers::panic("OpenGL ES init failed");
-	}
-#else
-	if (!gladLoadGLLoader(reinterpret_cast<GLADloadproc>(loadproc))) {
-		Helpers::panic("OpenGL init failed");
-	}
-#endif
-}
-
 FrontendSDL::FrontendSDL() {
 	if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS) < 0) {
 		Helpers::panic("Failed to initialize SDL2");
@@ -58,7 +46,9 @@ FrontendSDL::FrontendSDL() {
 			Helpers::panic("OpenGL context creation failed: %s", SDL_GetError());
 		}
 
-		loadGlFunctions(SDL_GL_GetProcAddress);
+		if (!gladLoadGLLoader(reinterpret_cast<GLADloadproc>(SDL_GL_GetProcAddress))) {
+			Helpers::panic("OpenGL init failed");
+		}
 	}
 
 #ifdef PANDA3DS_ENABLE_VULKAN