Stop dlopening libGL(ESv2).so

GLX/EGL are supposed to abstract exactly this away,
this is a bad hack at best and might totally break stuff at worst.
This commit is contained in:
sfan5
2022-07-09 22:49:15 +02:00
parent 25ae156944
commit 074e81f78f
4 changed files with 4 additions and 30 deletions

View File

@ -9,7 +9,6 @@
#include "irrString.h"
#include "irrArray.h"
#include "os.h"
#include <dlfcn.h>
#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
#include <android/native_activity.h>
@ -21,7 +20,7 @@ namespace video
{
CEGLManager::CEGLManager() : IContextManager(), EglWindow(0), EglDisplay(EGL_NO_DISPLAY),
EglSurface(EGL_NO_SURFACE), EglContext(EGL_NO_CONTEXT), EglConfig(0), MajorVersion(0), MinorVersion(0), libHandle(NULL)
EglSurface(EGL_NO_SURFACE), EglContext(EGL_NO_CONTEXT), EglConfig(0), MajorVersion(0), MinorVersion(0)
{
#ifdef _DEBUG
setDebugName("CEGLManager");
@ -110,9 +109,6 @@ void CEGLManager::terminate()
MajorVersion = 0;
MinorVersion = 0;
if (libHandle)
dlclose(libHandle);
}
bool CEGLManager::generateSurface()
@ -596,15 +592,7 @@ const SExposedVideoData& CEGLManager::getContext() const
void* CEGLManager::getProcAddress(const std::string &procName)
{
void* proc = NULL;
proc = (void*)eglGetProcAddress(procName.c_str());
if (!proc) { // fallback
if (!libHandle)
libHandle = dlopen("libGLESv2.so", RTLD_LAZY);
if (libHandle)
proc = dlsym(libHandle, procName.c_str());
}
return proc;
return (void*)eglGetProcAddress(procName.c_str());
}
bool CEGLManager::swapBuffers()