termux / x11-packages

A set of packages using X11 Windows System.
Other
547 stars 145 forks source link

[Bug]: gl4es is a stub #442

Closed truboxl closed 2 years ago

truboxl commented 2 years ago

Problem description

The current gl4es is a stub. I am not sure how somebody can get it working without symbol error like in https://github.com/termux/x11-packages/pull/373#issuecomment-913045821

I only managed to fix it up until it renders logs something but still black screen. Likely a major overhaul needed in gl4es to support Android X11 hybrid...

And no... Proot doesn't work... We are talking real hardware acceleration. Check glxinfo and make sure you aren't using VMware or llvmpipe rendering...

What steps will reproduce the bug?

~ $ glxinfo | grep -i opengl
OpenGL vendor string: Brian Paul
OpenGL renderer string: Mesa X11
OpenGL version string: 2.1 Mesa 17.3.9
OpenGL shading language version string: 1.20
OpenGL extensions:
~ $ glxgears
2980 frames in 5.0 seconds = 595.782 FPS
2143 frames in 5.0 seconds = 428.461 FPS
2672 frames in 5.0 seconds = 534.309 FPS
^C
~ $ LD_LIBRARY_PATH=$PREFIX/lib/gl4es glxinfo
CANNOT LINK EXECUTABLE "glxinfo": cannot locate symbol "glXGetFBConfigs" referenced by "/data/data/com.termux/files/usr/bin/glxinfo"...
~ $ LD_LIBRARY_PATH=$PREFIX/lib/gl4es glxgears
CANNOT LINK EXECUTABLE "glxgears": cannot locate symbol "glXChooseVisual" referenced by "/data/data/com.termux/files/usr/bin/glxgears"...

What is the expected behavior?

I only managed to fix until here, still black screen... More work is needed... Everything is done using VNC...

Below is logs for glxinfo and glxgears using LIBGL_FB= 0, 1 and 2 respectively...

gl4es is obviously doing something in the thousand FPS range unlike Mesa hundred FPS range...

Unfortunately the error message is not in sequence, they all end up move to top for whatever reason when trying to collect logs...

~ $ LD_LIBRARY_PATH=$HOME/egl/gl4es/lib LIBGL_FB=0 glxinfo
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to create EGL display.
Error: glXCreateContext failed
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Sep 29 2021 16:45:20
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: glX Will try to recycle EGL Surface
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=1 glxinfo
LIBGL: ERROR: EGL Error detected: EGL_BAD_NATIVE_WINDOW
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Sep 29 2021 16:45:20
LIBGL: framebuffer output enabled
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
Warning: GL error 0x506 at line 478
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_sLIBGL: ERROR: EGL Error detected: EGL_BAD_NATIVE_WINDOW
hading_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
Warning: GL error 0x506 at line 478

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, 
 LIBGL: ERROR: EGL Error detected: EGL_BAD_NATIVE_WINDOW
   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
Warning: GL error 0x506 at line 478

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

42 GLXFBConfigs:
    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
----------------------------------------------------------------------------
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458c398  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0  0  0  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458c398  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0  0  0  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458c430  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  0  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458c430  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  0  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458c4c8  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  8  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458c4c8  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  8  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458c560  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  8  0  0  0  0  4 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458c560  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  8  0  0  0  0  4 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458cb50  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  8  0  0  0  0  8 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458cb50  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  8  0  0  0  0  8 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458cd18  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  8  0  0  0  0 16 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x2458cd18  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  8  0  0  0  0 16 1 None
0x2458c5f8 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0  0  0  0  0  0  0  0 0 None
0x2458c5f8 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0  0  0  0  0  0  0  0 0 None
0x2458c690 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0 24  8  0  0  0  0  0 0 None
0x2458c690 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0 24  8  0  0  0  0  0 0 None
0x2458c728 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0  0  0  0  0  0  0  4 1 None
0x2458c728 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0  0  0  0  0  0  0  4 1 None
0x2458c7c0 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0 24  8  0  0  0  0  4 1 None
0x2458c7c0 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0 24  8  0  0  0  0  4 1 None
0x2458cbe8 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0 24  8  0  0  0  0  8 1 None
0x2458cbe8 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0 24  8  0  0  0  0  8 1 None
0x2458cdb0 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0 24  8  0  0  0  0 16 1 None
0x2458cdb0 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0 24  8  0  0  0  0 16 1 None
0x2458c138 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x2458c138 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x2458c008 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x2458c008 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x2458c0a0 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x2458c0a0 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x2458c1d0 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  0  0  0  0  0  0 0 None
0x2458c1d0 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  0  0  0  0  0  0 0 None
0x2458c268 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
0x2458c268 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
0x2458ce48 32 sg  0  16  0 r  . .  10 10 10  2 .  s  0 24  8  0  0  0  0  0 0 None
0x2458ce48 32 sg  0  16  0 r  y .  10 10 10  2 .  s  0 24  8  0  0  0  0  0 0 None
0x2458c300 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  8  0  0  0  0  4 1 None
0x2458c300 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  4 1 None
0x2458cab8 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  8  0  0  0  0  8 1 None
0x2458cab8 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  8 1 None
0x2458cc80 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  8  0  0  0  0 16 1 None
0x2458cc80 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0 16 1 None
~ $ LD_LIBRARY_PATH=$HOME/egl/gl4es/lib LIBGL_FB=2 glxinfo
LIBGL: ERROR: EGL Error detected: EGL_BAD_NATIVE_WINDOW
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Sep 29 2021 16:45:20
LIBGL: using framebuffer + fbo
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
LIBGL: Error while creating main fbo (0x8CD6)
Warning: GL error 0x506 at line 478
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_sLIBGL: ERROR: EGL Error detected: EGL_BAD_NATIVE_WINDOW
prite, 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
LIBGL: Error while creating main fbo (0x8CD6)
Warning: GL error 0x506 at line 478

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_maLIBGL: ERROR: EGL Error detected: EGL_BAD_NATIVE_WINDOW
p, 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
LIBGL: Error while creating main fbo (0x8CD6)
Warning: GL error 0x506 at line 478

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

42 GLXFBConfigs:
    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
----------------------------------------------------------------------------
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78c398  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0  0  0  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78c398  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0  0  0  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78c430  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  0  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78c430  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  0  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78c4c8  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  8  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78c4c8  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  8  0  0  0  0  0 0 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78c560  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  8  0  0  0  0  4 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78c560  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  8  0  0  0  0  4 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78cb50  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  8  0  0  0  0  8 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78cb50  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  8  0  0  0  0  8 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78cd18  0 sg  0  16  0 r  . .   5  6  5  0 .  s  0 24  8  0  0  0  0 16 1 None
LIBGL: Warning, gl4es_glXGetVisualFromFBConfig: XGetVisualInfo gives 0 VisualInfo for 24 depth and TrueColor class
0x9f78cd18  0 sg  0  16  0 r  y .   5  6  5  0 .  s  0 24  8  0  0  0  0 16 1 None
0x9f78c5f8 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0  0  0  0  0  0  0  0 0 None
0x9f78c5f8 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0  0  0  0  0  0  0  0 0 None
0x9f78c690 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0 24  8  0  0  0  0  0 0 None
0x9f78c690 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0 24  8  0  0  0  0  0 0 None
0x9f78c728 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0  0  0  0  0  0  0  4 1 None
0x9f78c728 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0  0  0  0  0  0  0  4 1 None
0x9f78c7c0 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0 24  8  0  0  0  0  4 1 None
0x9f78c7c0 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0 24  8  0  0  0  0  4 1 None
0x9f78cbe8 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0 24  8  0  0  0  0  8 1 None
0x9f78cbe8 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0 24  8  0  0  0  0  8 1 None
0x9f78cdb0 24 sg  0  16  0 r  . .   8  8  8  0 .  s  0 24  8  0  0  0  0 16 1 None
0x9f78cdb0 24 sg  0  16  0 r  y .   8  8  8  0 .  s  0 24  8  0  0  0  0 16 1 None
0x9f78c138 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x9f78c138 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x9f78c008 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x9f78c008 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x9f78c0a0 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x9f78c0a0 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0  0  0  0  0  0  0  0 0 None
0x9f78c1d0 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  0  0  0  0  0  0 0 None
0x9f78c1d0 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  0  0  0  0  0  0 0 None
0x9f78c268 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
0x9f78c268 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
0x9f78ce48 32 sg  0  16  0 r  . .  10 10 10  2 .  s  0 24  8  0  0  0  0  0 0 None
0x9f78ce48 32 sg  0  16  0 r  y .  10 10 10  2 .  s  0 24  8  0  0  0  0  0 0 None
0x9f78c300 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  8  0  0  0  0  4 1 None
0x9f78c300 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  4 1 None
0x9f78cab8 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  8  0  0  0  0  8 1 None
0x9f78cab8 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  8 1 None
0x9f78cc80 32 sg  0  16  0 r  . .   8  8  8  8 .  s  0 24  8  0  0  0  0 16 1 None
0x9f78cc80 32 sg  0  16  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0 16 1 None
~ $ LD_LIBRARY_PATH=$HOME/egl/gl4es/lib LIBGL_FB=0 glxgears
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to initialize EGL.
LIBGL: ERROR: EGL Error detected: EGL_BAD_PARAMETER
LIBGL: Unable to create EGL display.
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Sep 29 2021 16:45:20
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: glX Will try to recycle EGL Surface
LIBGL: Current folder is:/data/data/com.termux/files/home
Error: glXCreateContext failed
~ $ LD_LIBRARY_PATH=$HOME/egl/gl4es/lib LIBGL_FB=1 glxgears
LIBGL: ERROR: EGL Error detected: EGL_BAD_NATIVE_WINDOW
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Sep 29 2021 16:45:20
LIBGL: framebuffer output enabled
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
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
34677 frames in 5.0 seconds = 6935.304 FPS
34733 frames in 5.0 seconds = 6946.502 FPS
~ $ LD_LIBRARY_PATH=$HOME/egl/gl4es/lib LIBGL_FB=2 glxgears
LIBGL: ERROR: EGL Error detected: EGL_BAD_NATIVE_WINDOW
LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Sep 29 2021 16:45:20
LIBGL: using framebuffer + fbo
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
LIBGL: Error while creating main fbo (0x8CD6)
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
LIBGL: Error while creating main fbo (0x8CDD)
11527 frames in 5.0 seconds = 2305.263 FPS
11214 frames in 5.0 seconds = 2242.743 FPS

System information

Application version:
0.117
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.org/apt/termux-main/ stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.org/apt/termux-x11 x11 main
# game-repo (sources.list.d/game.list)
deb https://packages.termux.org/apt/termux-games games stable
# science-repo (sources.list.d/science.list)
deb https://packages.termux.org/apt/termux-science science stable
Updatable packages:
libsqlite/stable 3.36.0-1 aarch64 [upgradable from: 3.36.0]
sqlite/stable 3.36.0-1 aarch64 [upgradable from: 3.36.0]
Android version:
11
Kernel build information:
Linux localhost 4.4.177-21859867 #1 SMP PREEMPT Mon Aug 9 18:53:04 +07 2021 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-A307GN
khanhduytran0 commented 2 years ago
LIBGL_FB

Controls the Framebuffer output

0 : Default, using standard x11 rendering 1 : Use Framebuffer output (x11 bypassed, only fullscreen) 2 : Use Framebuffer, but also an intermediary FBO 3 : Use PBuffer, allowing x11 (and windowed) rendering even if driver doesn't support it

Android graphics driver has never been designed for X11, so mode 0 it wouldn’t work. PBuffer should work by copying each frame from an offscreen framebuffer to the X11 window.

EDIT: I have looked at the code and found that gl4es uses pixmap for LIBGL_FB=3, which Android doesn’t support. Replacing pixmap with something similar should get it to work.

truboxl commented 2 years ago

I feel like we are so near yet so far away from driving actual hardware accelerated X11 graphics... Guess fixing LIBGL_FB=3 is the way forward huh...