ptitSeb / gl4es

GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4.
http://ptitseb.github.io/gl4es/
MIT License
699 stars 159 forks source link

Android & X11 #331

Closed truboxl closed 1 year ago

truboxl commented 3 years ago

Is it possible to add X11 support to Android version of gl4es? The folks over Termux have compiled a lot of X11 packages linked with Bionic libc. I try to compile Android gl4es with X11, load up gl4es with LD_LIBRARY_PATH, but end up with EGL_BAD_PARAMETER error. Will include log later. Probably need to research how EGL works in Android vs Linux & X11...

khanhduytran0 commented 3 years ago

Android uses their own Surface object for rendering, not X11, so you may want to run gl4es in pbuffer mode.

truboxl commented 3 years ago

I have added logs over at https://github.com/termux/x11-packages/issues/442

I build using custom parameters

$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fd1f491..65d56bc0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,6 +94,10 @@ if(ANDROID)
     add_definitions(-DNOX11 -DNO_GBM -DDEFAULT_ES=2)
 endif()

+if(TERMUX)
+    remove_definitions(-DANDROID -DNOX11)
+endif()
+
 if(USE_ANDROID_LOG)
     add_definitions(-DUSE_ANDROID_LOG)
     find_library(log-lib log)
$ cmake .. -DANDROID=1 -DTERMUX=1 -DCMAKE_SYSTEM_NAME="Linux"

Obviously playing with fire... LIBGL_FB=3 doesn't seem to work... Error sequence is not in order during collect logs, I dunno why

~ $ LD_LIBRARY_PATH=$HOME/egl/gl4es/lib LIBGL_FB=3 glxinfo
Error: couldn't find RGB GLX visual or fbconfig
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Sep 29 2021 16:45:20
LIBGL: using pbuffer
LIBGL: Using GLES 2.0 backend
LIBGL: loaded: libGLESv2.so
LIBGL: loaded: libEGL.so
LIBGL: Using GLES 2.0 backend
LIBGL: Hardware Full NPOT detected and used
LIBGL: Extension GL_EXT_blend_minmax  detected and used
LIBGL: FBO are in core, and so used
LIBGL: PointSprite are in core, and so used
LIBGL: CubeMap are in core, and so used
LIBGL: BlendColor is in core, and so used
LIBGL: Blend Subtract is in core, and so used
LIBGL: Blend Function and Equation Separation is in core, and so used
LIBGL: Texture Mirrored Repeat is in core, and so used
LIBGL: Extension GL_OES_mapbuffer  detected
LIBGL: Extension GL_OES_element_index_uint  detected and used
LIBGL: Extension GL_OES_packed_depth_stencil  detected and used
LIBGL: Extension GL_OES_depth24  detected and used
LIBGL: Extension GL_OES_rgb8_rgba8  detected and used
LIBGL: Extension GL_EXT_texture_format_BGRA8888  detected and used
LIBGL: Extension GL_OES_depth_texture  detected and used
LIBGL: Extension GL_OES_texture_stencil8  detected and used
LIBGL: Extension GL_EXT_texture_rg  detected and used
LIBGL: Extension GL_EXT_color_buffer_float  detected and used
LIBGL: Extension GL_EXT_color_buffer_half_float  detected and used
LIBGL: high precision float in fragment shader available and used
LIBGL: Max vertex attrib: 16
LIBGL: Extension GL_OES_standard_derivatives  detected and used
LIBGL: Max texture size: 8192
LIBGL: Max Varying Vector: 31
LIBGL: Texture Units: 16/16 (hardware: 16), Max lights: 8, Max planes: 6
LIBGL: Max Color Attachments: 1 / Draw buffers: 1
LIBGL: Hardware vendor is ARM
LIBGL: GLSL 300 es supported
LIBGL: GLSL 310 es supported and used
LIBGL: sRGB surface supported
LIBGL: EGLImage to Texture2D supported
LIBGL: EGLImage to RenderBuffer supported
LIBGL: Targeting OpenGL 2.1
LIBGL: NPOT texture handled in hardware
LIBGL: Not trying to batch small subsequent glDrawXXXX
LIBGL: try to use VBO
LIBGL: glXMakeCurrent FBO workaround enabled
LIBGL: FBO workaround for using binded texture enabled
LIBGL: Force texture for Attachment color0 on FBO
LIBGL: Hack to trigger a SwapBuffers when a Full Framebuffer Blit on default FBO is done
LIBGL: Current folder is:/data/data/com.termux/files/home
name of display: :1

3 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x04d 32 tc  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
0x021 24 tc  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
0x022 24 dc  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
~ $ LD_LIBRARY_PATH=$HOME/egl/gl4es/lib LIBGL_FB=3 glxgears
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Sep 29 2021 16:45:20
LIBGL: using pbuffer
LIBGL: Using GLES 2.0 backend
LIBGL: loaded: libGLESv2.so
LIBGL: loaded: libEGL.so
LIBGL: Using GLES 2.0 backend
LIBGL: Hardware Full NPOT detected and used
LIBGL: Extension GL_EXT_blend_minmax  detected and used
LIBGL: FBO are in core, and so used
LIBGL: PointSprite are in core, and so used
LIBGL: CubeMap are in core, and so used
LIBGL: BlendColor is in core, and so used
LIBGL: Blend Subtract is in core, and so used
LIBGL: Blend Function and Equation Separation is in core, and so used
LIBGL: Texture Mirrored Repeat is in core, and so used
LIBGL: Extension GL_OES_mapbuffer  detected
LIBGL: Extension GL_OES_element_index_uint  detected and used
LIBGL: Extension GL_OES_packed_depth_stencil  detected and used
LIBGL: Extension GL_OES_depth24  detected and used
LIBGL: Extension GL_OES_rgb8_rgba8  detected and used
LIBGL: Extension GL_EXT_texture_format_BGRA8888  detected and used
LIBGL: Extension GL_OES_depth_texture  detected and used
LIBGL: Extension GL_OES_texture_stencil8  detected and used
LIBGL: Extension GL_EXT_texture_rg  detected and used
LIBGL: Extension GL_EXT_color_buffer_float  detected and used
LIBGL: Extension GL_EXT_color_buffer_half_float  detected and used
LIBGL: high precision float in fragment shader available and used
LIBGL: Max vertex attrib: 16
LIBGL: Extension GL_OES_standard_derivatives  detected and used
LIBGL: Max texture size: 8192
LIBGL: Max Varying Vector: 31
LIBGL: Texture Units: 16/16 (hardware: 16), Max lights: 8, Max planes: 6
LIBGL: Max Color Attachments: 1 / Draw buffers: 1
LIBGL: Hardware vendor is ARM
LIBGL: GLSL 300 es supported
LIBGL: GLSL 310 es supported and used
LIBGL: sRGB surface supported
LIBGL: EGLImage to Texture2D supported
LIBGL: EGLImage to RenderBuffer supported
LIBGL: Targeting OpenGL 2.1
LIBGL: NPOT texture handled in hardware
LIBGL: Not trying to batch small subsequent glDrawXXXX
LIBGL: try to use VBO
LIBGL: glXMakeCurrent FBO workaround enabled
LIBGL: FBO workaround for using binded texture enabled
LIBGL: Force texture for Attachment color0 on FBO
LIBGL: Hack to trigger a SwapBuffers when a Full Framebuffer Blit on default FBO is done
LIBGL: Current folder is:/data/data/com.termux/files/home
Error: couldn't get an RGB, Double-buffered visual
khanhduytran0 commented 3 years ago

I got to the same point. I have looked at the code and found that gl4es uses pixmap for LIBGL_FB=3, which Android doesn’t support.

ptitSeb commented 3 years ago

I got to the same point. I have looked at the code and found that gl4es uses pixmap for LIBGL_FB=3, which Android doesn’t support.

No completly. It tries to use pixmap first, but fallback to PBuffer if pixmap are not available.

truboxl commented 3 years ago

The log does say LIBGL: using pbuffer so I guess fallback is working

Not sure where to look to fix these... Error: couldn't find RGB GLX visual or fbconfig Error: couldn't get an RGB, Double-buffered visual

khanhduytran0 commented 3 years ago

The fallback seems to fail, so I modified a little there (I saw the fallback that set to EGL_PBUFFER_BIT but stills fail, idk why)

diff --git a/src/glx/glx.c b/src/glx/glx.c
index 0bcc438f..78a32136 100644
--- a/src/glx/glx.c
+++ b/src/glx/glx.c
@@ -1819,7 +1819,7 @@ GLXFBConfig *gl4es_glXChooseFBConfig(Display *display, int screen,
         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;

This made glxgears works, but nothing renders, maybe one of glFinish or glReadPixels is not working?

Edit: glReadPixels gives GL_OUT_OF_MEMORY, any ideas?

truboxl commented 3 years ago

That does seem to work... glxgears showing up inside VNC... No more of those weird errors... However performance is really subpar...

~/egl/gl4es/lib $ LIBGL_FB=3 LD_LIBRARY_PATH=. glxinfo
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Oct 11 2021 00:51:03
LIBGL: using pbuffer
LIBGL: Using GLES 2.0 backend
LIBGL: loaded: libGLESv2.so
LIBGL: loaded: libEGL.so
LIBGL: Using GLES 2.0 backend
LIBGL: Hardware Full NPOT detected and used
LIBGL: Extension GL_EXT_blend_minmax  detected and used
LIBGL: FBO are in core, and so used
LIBGL: PointSprite are in core, and so used
LIBGL: CubeMap are in core, and so used
LIBGL: BlendColor is in core, and so used
LIBGL: Blend Subtract is in core, and so used
LIBGL: Blend Function and Equation Separation is in core, and so used
LIBGL: Texture Mirrored Repeat is in core, and so used
LIBGL: Extension GL_OES_mapbuffer  detected
LIBGL: Extension GL_OES_element_index_uint  detected and used
LIBGL: Extension GL_OES_packed_depth_stencil  detected and used
LIBGL: Extension GL_OES_depth24  detected and used
LIBGL: Extension GL_OES_rgb8_rgba8  detected and used
LIBGL: Extension GL_EXT_texture_format_BGRA8888  detected and used
LIBGL: Extension GL_OES_depth_texture  detected and used
LIBGL: Extension GL_OES_texture_stencil8  detected and used
LIBGL: Extension GL_EXT_texture_rg  detected and used
LIBGL: Extension GL_EXT_color_buffer_float  detected and used
LIBGL: Extension GL_EXT_color_buffer_half_float  detected and used
LIBGL: high precision float in fragment shader available and used
LIBGL: Max vertex attrib: 16
LIBGL: Extension GL_OES_standard_derivatives  detected and used
LIBGL: Max texture size: 8192
LIBGL: Max Varying Vector: 31
LIBGL: Texture Units: 16/16 (hardware: 16), Max lights: 8, Max planes: 6
LIBGL: Max Color Attachments: 1 / Draw buffers: 1
LIBGL: Hardware vendor is ARM
LIBGL: GLSL 300 es supported
LIBGL: GLSL 310 es supported and used
LIBGL: sRGB surface supported
LIBGL: EGLImage to Texture2D supported
LIBGL: EGLImage to RenderBuffer supported
LIBGL: Targeting OpenGL 2.1
LIBGL: NPOT texture handled in hardware
LIBGL: Not trying to batch small subsequent glDrawXXXX
LIBGL: try to use VBO
LIBGL: glXMakeCurrent FBO workaround enabled
LIBGL: FBO workaround for using binded texture enabled
LIBGL: Force texture for Attachment color0 on FBO
LIBGL: Hack to trigger a SwapBuffers when a Full Framebuffer Blit on default FBO is done
LIBGL: Current folder is:/data/data/com.termux/files/home/egl/gl4es/lib
name of display: :1
display: :1  screen: 0
direct rendering: Yes
server glx vendor string: ptitSeb
server glx version string: 1.4 GL4ES
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_swap_control, GLX_MESA_swap_control, GLX_SGIX_pbuffer, 
    GLX_SGI_swap_control
client glx vendor string: ptitSeb
client glx version string: 1.4 GL4ES
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_swap_control, GLX_MESA_swap_control, GLX_SGIX_pbuffer, 
    GLX_SGI_swap_control
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_swap_control, GLX_MESA_swap_control, GLX_SGIX_pbuffer, 
    GLX_SGI_swap_control
OpenGL vendor string: ptitSeb
OpenGL renderer string: GL4ES wrapper
OpenGL core profile version string: 2.1 gl4es wrapper 1.1.5
OpenGL core profile shading language version string: 1.20 via gl4es
OpenGL core profile extensions:
    GL_APPLE_texture_2D_limited_npot, GL_ARB_ES2_compatibility, 
    GL_ARB_depth_texture, GL_ARB_draw_buffers, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_instanced, 
    GL_ARB_fragment_program, GL_ARB_fragment_shader, 
    GL_ARB_framebuffer_object, GL_ARB_instanced_arrays, 
    GL_ARB_map_buffer_range, GL_ARB_multisample, GL_ARB_multitexture, 
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shader_objects, 
    GL_ARB_shading_language_100, GL_ARB_texture_border_clamp, 
    GL_ARB_texture_compression, GL_ARB_texture_cube_map, 
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_vertex_array_object, 
    GL_ARB_vertex_buffer, GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, 
    GL_ARB_vertex_shader, GL_ATIX_texture_env_route, 
    GL_ATI_texture_env_combine3, GL_EXT_abgr, GL_EXT_bgra, 
    GL_EXT_blend_color, GL_EXT_blend_equation_separate, 
    GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
    GL_EXT_color_buffer_float, GL_EXT_color_buffer_half_float, 
    GL_EXT_compiled_vertex_array, GL_EXT_compiled_vertex_arrays, 
    GL_EXT_depth_texture, GL_EXT_direct_state_access, GL_EXT_draw_buffers2, 
    GL_EXT_draw_elements_base_vertex, GL_EXT_draw_range_elements, 
    GL_EXT_fog_coord, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_object, 
    GL_EXT_multi_draw_arrays, GL_EXT_packed_depth_stencil, 
    GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_polygon_offset, 
    GL_EXT_program_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color, 
    GL_EXT_separate_specular_color, GL_EXT_stencil_wrap, 
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_dxt3, 
    GL_EXT_texture_compression_dxt5, GL_EXT_texture_compression_s3tc, 
    GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp, 
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_crossbar, GL_EXT_texture_env_dot3, 
    GL_EXT_texture_object, GL_EXT_texture_rg, GL_EXT_vertex_array, 
    GL_GL4ES_hint, GL_NV_blend_square, GL_NV_fog_distance, 
    GL_NV_texture_env_combine4, GL_OES_texture_compression_S3TC, 
    GL_SGIS_generate_mipmap, GL_SGIS_texture_edge_clamp, 
    GL_SUN_multi_draw_arrays

OpenGL version string: 2.1 gl4es wrapper 1.1.5
OpenGL shading language version string: 1.20 via gl4es
OpenGL extensions:
    GL_APPLE_texture_2D_limited_npot, GL_ARB_ES2_compatibility, 
    GL_ARB_depth_texture, GL_ARB_draw_buffers, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_instanced, 
    GL_ARB_fragment_program, GL_ARB_fragment_shader, 
    GL_ARB_framebuffer_object, GL_ARB_instanced_arrays, 
    GL_ARB_map_buffer_range, GL_ARB_multisample, GL_ARB_multitexture, 
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shader_objects, 
    GL_ARB_shading_language_100, GL_ARB_texture_border_clamp, 
    GL_ARB_texture_compression, GL_ARB_texture_cube_map, 
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_vertex_array_object, 
    GL_ARB_vertex_buffer, GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, 
    GL_ARB_vertex_shader, GL_ATIX_texture_env_route, 
    GL_ATI_texture_env_combine3, GL_EXT_abgr, GL_EXT_bgra, 
    GL_EXT_blend_color, GL_EXT_blend_equation_separate, 
    GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
    GL_EXT_color_buffer_float, GL_EXT_color_buffer_half_float, 
    GL_EXT_compiled_vertex_array, GL_EXT_compiled_vertex_arrays, 
    GL_EXT_depth_texture, GL_EXT_direct_state_access, GL_EXT_draw_buffers2, 
    GL_EXT_draw_elements_base_vertex, GL_EXT_draw_range_elements, 
    GL_EXT_fog_coord, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_object, 
    GL_EXT_multi_draw_arrays, GL_EXT_packed_depth_stencil, 
    GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_polygon_offset, 
    GL_EXT_program_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color, 
    GL_EXT_separate_specular_color, GL_EXT_stencil_wrap, 
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_dxt3, 
    GL_EXT_texture_compression_dxt5, GL_EXT_texture_compression_s3tc, 
    GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp, 
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_crossbar, GL_EXT_texture_env_dot3, 
    GL_EXT_texture_object, GL_EXT_texture_rg, GL_EXT_vertex_array, 
    GL_GL4ES_hint, GL_NV_blend_square, GL_NV_fog_distance, 
    GL_NV_texture_env_combine4, GL_OES_texture_compression_S3TC, 
    GL_SGIS_generate_mipmap, GL_SGIS_texture_edge_clamp, 
    GL_SUN_multi_draw_arrays

OpenGL ES profile version string: 2.1 gl4es wrapper 1.1.5
OpenGL ES profile shading language version string: 1.20 via gl4es
OpenGL ES profile extensions:
    GL_APPLE_texture_2D_limited_npot, GL_ARB_ES2_compatibility, 
    GL_ARB_depth_texture, GL_ARB_draw_buffers, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_instanced, 
    GL_ARB_fragment_program, GL_ARB_fragment_shader, 
    GL_ARB_framebuffer_object, GL_ARB_instanced_arrays, 
    GL_ARB_map_buffer_range, GL_ARB_multisample, GL_ARB_multitexture, 
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shader_objects, 
    GL_ARB_shading_language_100, GL_ARB_texture_border_clamp, 
    GL_ARB_texture_compression, GL_ARB_texture_cube_map, 
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_vertex_array_object, 
    GL_ARB_vertex_buffer, GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, 
    GL_ARB_vertex_shader, GL_ATIX_texture_env_route, 
    GL_ATI_texture_env_combine3, GL_EXT_abgr, GL_EXT_bgra, 
    GL_EXT_blend_color, GL_EXT_blend_equation_separate, 
    GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
    GL_EXT_color_buffer_float, GL_EXT_color_buffer_half_float, 
    GL_EXT_compiled_vertex_array, GL_EXT_compiled_vertex_arrays, 
    GL_EXT_depth_texture, GL_EXT_direct_state_access, GL_EXT_draw_buffers2, 
    GL_EXT_draw_elements_base_vertex, GL_EXT_draw_range_elements, 
    GL_EXT_fog_coord, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_object, 
    GL_EXT_multi_draw_arrays, GL_EXT_packed_depth_stencil, 
    GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_polygon_offset, 
    GL_EXT_program_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color, 
    GL_EXT_separate_specular_color, GL_EXT_stencil_wrap, 
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_dxt3, 
    GL_EXT_texture_compression_dxt5, GL_EXT_texture_compression_s3tc, 
    GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp, 
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_crossbar, GL_EXT_texture_env_dot3, 
    GL_EXT_texture_object, GL_EXT_texture_rg, GL_EXT_vertex_array, 
    GL_GL4ES_hint, GL_NV_blend_square, GL_NV_fog_distance, 
    GL_NV_texture_env_combine4, GL_OES_texture_compression_S3TC, 
    GL_SGIS_generate_mipmap, GL_SGIS_texture_edge_clamp, 
    GL_SUN_multi_draw_arrays

3 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x04d 32 tc  0  16  0 r  y .  10 10 10  2 .  s  0 24  8  0  0  0  0  0 0 None
0x021 24 tc  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
0x022 24 dc  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
~/egl/gl4es/lib $ LIBGL_FB=3 LD_LIBRARY_PATH=. glxgears
LIBGL: Cannot use eglCopyBuffers, disabling it's use: LIBGL: ERROR: EGL Error detected: EGL_BAD_NATIVE_PIXMAP
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Oct 11 2021 00:51:03
LIBGL: using pbuffer
LIBGL: Using GLES 2.0 backend
LIBGL: loaded: libGLESv2.so
LIBGL: loaded: libEGL.so
LIBGL: Using GLES 2.0 backend
LIBGL: Hardware Full NPOT detected and used
LIBGL: Extension GL_EXT_blend_minmax  detected and used
LIBGL: FBO are in core, and so used
LIBGL: PointSprite are in core, and so used
LIBGL: CubeMap are in core, and so used
LIBGL: BlendColor is in core, and so used
LIBGL: Blend Subtract is in core, and so used
LIBGL: Blend Function and Equation Separation is in core, and so used
LIBGL: Texture Mirrored Repeat is in core, and so used
LIBGL: Extension GL_OES_mapbuffer  detected
LIBGL: Extension GL_OES_element_index_uint  detected and used
LIBGL: Extension GL_OES_packed_depth_stencil  detected and used
LIBGL: Extension GL_OES_depth24  detected and used
LIBGL: Extension GL_OES_rgb8_rgba8  detected and used
LIBGL: Extension GL_EXT_texture_format_BGRA8888  detected and used
LIBGL: Extension GL_OES_depth_texture  detected and used
LIBGL: Extension GL_OES_texture_stencil8  detected and used
LIBGL: Extension GL_EXT_texture_rg  detected and used
LIBGL: Extension GL_EXT_color_buffer_float  detected and used
LIBGL: Extension GL_EXT_color_buffer_half_float  detected and used
LIBGL: high precision float in fragment shader available and used
LIBGL: Max vertex attrib: 16
LIBGL: Extension GL_OES_standard_derivatives  detected and used
LIBGL: Max texture size: 8192
LIBGL: Max Varying Vector: 31
LIBGL: Texture Units: 16/16 (hardware: 16), Max lights: 8, Max planes: 6
LIBGL: Max Color Attachments: 1 / Draw buffers: 1
LIBGL: Hardware vendor is ARM
LIBGL: GLSL 300 es supported
LIBGL: GLSL 310 es supported and used
LIBGL: sRGB surface supported
LIBGL: EGLImage to Texture2D supported
LIBGL: EGLImage to RenderBuffer supported
LIBGL: Targeting OpenGL 2.1
LIBGL: NPOT texture handled in hardware
LIBGL: Not trying to batch small subsequent glDrawXXXX
LIBGL: try to use VBO
LIBGL: glXMakeCurrent FBO workaround enabled
LIBGL: FBO workaround for using binded texture enabled
LIBGL: Force texture for Attachment color0 on FBO
LIBGL: Hack to trigger a SwapBuffers when a Full Framebuffer Blit on default FBO is done
LIBGL: Current folder is:/data/data/com.termux/files/home/egl/gl4es/lib
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
176 frames in 5.0 seconds = 35.066 FPS
177 frames in 5.0 seconds = 35.234 FPS
175 frames in 5.0 seconds = 34.958 FPS
176 frames in 5.0 seconds = 35.057 FPS
174 frames in 5.0 seconds = 34.748 FPS
truboxl commented 1 year ago

No longer needed. Thanks.