Skip to content

Commit

Permalink
Who put this here
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Oct 19, 2023
1 parent b79c129 commit 70ba204
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/panda_sdl/frontend_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 70ba204

Please sign in to comment.