[Feat|Fix] (...): Add/Fix lots of stuff, being able not to crash in MC.

This commit is contained in:
BZLZHH
2025-10-06 16:08:35 +08:00
parent e37dedb72d
commit bd1056f9c9
36 changed files with 1164 additions and 201 deletions
@@ -863,21 +863,45 @@ namespace MobileGL {
if (libEGL != NULL) { \
MG_External::EGL::name = (MG_External::EGL::name##_PTR)ProcAddress(libEGL, #name); \
}
void InitEGL() {
INIT_EGL_FUNC(eglGetProcAddress)
INIT_EGL_FUNC(eglBindAPI)
INIT_EGL_FUNC(eglInitialize)
INIT_EGL_FUNC(eglGetDisplay)
INIT_EGL_FUNC(eglCreatePbufferSurface)
INIT_EGL_FUNC(eglDestroySurface)
INIT_EGL_FUNC(eglDestroyContext)
INIT_EGL_FUNC(eglMakeCurrent)
INIT_EGL_FUNC(eglBindTexImage)
INIT_EGL_FUNC(eglChooseConfig)
INIT_EGL_FUNC(eglCopyBuffers)
INIT_EGL_FUNC(eglCreateContext)
INIT_EGL_FUNC(eglQueryString)
INIT_EGL_FUNC(eglTerminate)
INIT_EGL_FUNC(eglCreatePbufferFromClientBuffer)
INIT_EGL_FUNC(eglCreatePbufferSurface)
INIT_EGL_FUNC(eglCreatePixmapSurface)
INIT_EGL_FUNC(eglCreatePlatformWindowSurface)
INIT_EGL_FUNC(eglCreateWindowSurface)
INIT_EGL_FUNC(eglDestroyContext)
INIT_EGL_FUNC(eglDestroySurface)
INIT_EGL_FUNC(eglGetConfigAttrib)
INIT_EGL_FUNC(eglGetConfigs)
INIT_EGL_FUNC(eglGetCurrentContext)
INIT_EGL_FUNC(eglGetCurrentDisplay)
INIT_EGL_FUNC(eglGetCurrentSurface)
INIT_EGL_FUNC(eglGetDisplay)
INIT_EGL_FUNC(eglGetPlatformDisplay)
INIT_EGL_FUNC(eglGetError)
INIT_EGL_FUNC(eglGetProcAddress)
INIT_EGL_FUNC(eglInitialize)
INIT_EGL_FUNC(eglMakeCurrent)
INIT_EGL_FUNC(eglQueryAPI)
INIT_EGL_FUNC(eglQueryContext)
INIT_EGL_FUNC(eglQueryString)
INIT_EGL_FUNC(eglQuerySurface)
INIT_EGL_FUNC(eglReleaseTexImage)
INIT_EGL_FUNC(eglReleaseThread)
INIT_EGL_FUNC(eglSurfaceAttrib)
INIT_EGL_FUNC(eglSwapBuffers)
INIT_EGL_FUNC(eglSwapBuffersWithDamageEXT)
INIT_EGL_FUNC(eglSwapInterval)
INIT_EGL_FUNC(eglTerminate)
INIT_EGL_FUNC(eglUnlockSurfaceKHR)
INIT_EGL_FUNC(eglWaitClient)
INIT_EGL_FUNC(eglWaitGL)
INIT_EGL_FUNC(eglWaitNative)
EGLint configAttribs[] = {EGL_RED_SIZE,
8,