0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-11 13:09:18 +00:00
termux-packages/disabled-packages/gl4es/src_glx_glx.c.patch
Jia Yuan Lo 12b931ddb0 gl4es: Disabled
gl4es on Linux works since the driver support is there.
gl4es on Android works for OpenGL to OpenGL ES I guess.
gl4es on Termux however have to handle GLX to OpenGL ES which misses
quite a few extensions and performance loss to due to conversion.

Retire this package since mesa and virglrenderer are far more capable
than gl4es and better at serving Termux use cases.
2023-04-08 00:08:54 +08:00

40 lines
1.5 KiB
Diff

diff -uNr gl4es/src/glx/glx.c gl4es.mod/src/glx/glx.c
--- gl4es/src/glx/glx.c 2021-10-13 23:49:59.663443188 +0800
+++ gl4es.mod/src/glx/glx.c 2021-10-13 23:48:57.699443233 +0800
@@ -770,8 +770,11 @@
}
result = egl_eglChooseConfig(eglDisplay, configAttribs, fake->eglConfigs, 64, &fake->eglConfigsCount);
+
+#ifndef NO_GBM
if(fake->eglConfigsCount && globals4es.usegbm)
fake->eglconfigIdx = FindGBMConfig(eglDisplay, fake->eglConfigs, fake->eglConfigsCount);
+#endif
CheckEGLErrors();
if (result != EGL_TRUE || fake->eglConfigsCount == 0) {
@@ -951,10 +954,12 @@
}
result = egl_eglChooseConfig(eglDisplay, configAttribs, fake->eglConfigs, 64, &fake->eglConfigsCount);
+
+ fake->eglconfigIdx = 0;
+#ifndef NO_GBM
if(fake->eglConfigsCount && globals4es.usegbm)
fake->eglconfigIdx = FindGBMConfig(eglDisplay, fake->eglConfigs, fake->eglConfigsCount);
- else
- fake->eglconfigIdx = 0;
+#endif
CheckEGLErrors();
if (result != EGL_TRUE || fake->eglConfigsCount == 0) {
@@ -1819,7 +1824,7 @@
attr[cur++] = EGL_STENCIL_SIZE;
attr[cur++] = tmp;
}
- attr[1] |= (globals4es.usepbuffer)?(/*EGL_PBUFFER_BIT|*/EGL_PIXMAP_BIT):EGL_WINDOW_BIT;
+ attr[1] |= (globals4es.usepbuffer)?(EGL_PBUFFER_BIT/*|EGL_PIXMAP_BIT*/):EGL_WINDOW_BIT;
attr[cur++] = EGL_RENDERABLE_TYPE;
attr[cur++] = (hardext.esversion==1)?EGL_OPENGL_ES_BIT:EGL_OPENGL_ES2_BIT;