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
669 stars 151 forks source link

LIBGL: warning, gles is NULL #103

Open e-cl opened 5 years ago

e-cl commented 5 years ago

Good afternoon.

I'm trying to build and use gl4es in ubuntu running in chroot on android using linux deploy. I built gl4es but when i try to run something this is what happens.

eclipse@localhost:~$ LD_LIBRARY_PATH=/opt/gl4es glxinfo LIBGL: Initialising gl4es LIBGL: v1.1.1 built on Mar 22 2019 23:27:16 LIBGL: Using GLES 2.0 backend LIBGL: warning, gles is NULL LIBGL: loaded: libEGL.so.1 LIBGL: Using GLES 2.0 backend LIBGL: warning, gles_glGetString is NULL LIBGL: warning, gles_glGetIntegerv is NULL LIBGL: warning, gles_glGetError is NULL Segmentation fault eclipse@localhost:~$ LD_LIBRARY_PATH=/opt/gl4es LIBGL_GLES=/home/eclipse/gl4es/libGLES_CM.so glxinfo LIBGL: Initialising gl4es LIBGL: v1.1.1 built on Mar 22 2019 23:27:16 LIBGL: Using GLES 2.0 backend LIBGL_GLES override failed: /home/eclipse/gl4es/libGLES_CM.so: cannot open shared object file: No such file or directory LIBGL: warning, gles is NULL LIBGL: loaded: libEGL.so.1 LIBGL: Using GLES 2.0 backend LIBGL: warning, gles_glGetString is NULL LIBGL: warning, gles_glGetIntegerv is NULL LIBGL: warning, gles_glGetError is NULL Segmentation fault eclipse@localhost:~$ ls -la /home/eclipse/gl4es/ total 9864 drwxrwxrwx. 3 eclipse eclipse 4096 мар 23 00:35 . drwxr-xr-x. 16 eclipse eclipse 4096 мар 23 00:48 .. drwxr-xr-x. 11 eclipse eclipse 4096 мар 22 23:07 gl4es -rwxrwxr-x. 1 eclipse eclipse 3833988 мар 23 00:35 libGLES_CM.so -rwxrwxrwx. 1 eclipse eclipse 435332 мар 23 00:24 libGLES_trace.so -rwxrwxrwx. 1 eclipse eclipse 206232 мар 23 00:24 libGLESv1_CM_adreno.so -rwxrwxrwx. 1 eclipse eclipse 25608 мар 23 00:24 libGLESv1_CM_orig.so -rwxrwxrwx. 1 eclipse eclipse 159080 мар 23 00:24 libGLESv1_CM.so -rwxrwxrwx. 1 eclipse eclipse 1280448 мар 23 00:24 libGLESv2_adreno.so -rwxrwxrwx. 1 eclipse eclipse 46088 мар 23 00:24 libGLESv2_orig.so -rwxrwxrwx. 1 eclipse eclipse 3833988 мар 23 00:24 libGLESv2.so -rwxrwxrwx. 1 eclipse eclipse 165444 мар 23 00:24 libglib-2.0.so

I copied all libGLES*.so from my android. Or i did it wrong? Where do i get them them? Thank you in advance

ptitSeb commented 5 years ago

I don't think the Android version will work. Is it the same architecture (like float-abi softfp vs hard). Use "file" on the Android lib to check, but I'm pretty sure you ened to find ubuntu version of the GLES libs for this to work.

e-cl commented 5 years ago

I see. Thank you. Installed libgles2-mesa package, not it runs. Here's the output of glxinfo.

LD_LIBRARY_PATH=/opt/gl4es glxinfo LIBGL: Initialising gl4es LIBGL: v1.1.1 built on Mar 22 2019 23:27:16 LIBGL: Using GLES 2.0 backend LIBGL: loaded: libGLESv2.so.2 LIBGL: loaded: libEGL.so.1 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 Substract 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_multi_draw_arrays detected 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_OES_texture_float detected and used LIBGL: Extension GL_OES_texture_half_float detected and used LIBGL: Extension GL_EXT_color_buffer_float detected and used LIBGL: high precision float in fragment shader available and used LIBGL: Extension GL_EXT_frag_depth detected 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: 32 LIBGL: Texture Units: 8(8), Max lights: 8, Max planes: 6 LIBGL: Hardware vendor is VMware, Inc. LIBGL: sRGB surface supported LIBGL: Targeting OpenGL 2.0 LIBGL: glX Will try to recycle EGL Surface LIBGL: Current folder is:/home/eclipse name of display: :0.0 display: :0 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_swap_control, GLX_MESA_swap_control, 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_swap_control, GLX_MESA_swap_control, 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_swap_control, GLX_MESA_swap_control, GLX_SGI_swap_control OpenGL vendor string: ptitSeb OpenGL renderer string: GL4ES wrapper OpenGL core profile version string: 2.0 gl4es wrapper 1.1.1 OpenGL core profile shading language version string: 1.10 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_shader, GL_ARB_framebuffer_object, GL_ARB_instanced_arrays, 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_vertex_array_object, GL_ARB_vertex_buffer, GL_ARB_vertex_buffer_object, 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_compiled_vertex_array, GL_EXT_depth_texture, GL_EXT_direct_state_access, GL_EXT_draw_elements_base_vertex, GL_EXT_draw_range_elements, GL_EXT_fog_coord, 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_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_float, GL_EXT_texture_half_float, GL_EXT_texture_object, GL_EXT_texture_rg, GL_EXT_vertex_array, GL_GL4ES_hint, 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.0 gl4es wrapper 1.1.1 OpenGL shading language version string: 1.10 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_shader, GL_ARB_framebuffer_object, GL_ARB_instanced_arrays, 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_vertex_array_object, GL_ARB_vertex_buffer, GL_ARB_vertex_buffer_object, 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_compiled_vertex_array, GL_EXT_depth_texture, GL_EXT_direct_state_access, GL_EXT_draw_elements_base_vertex, GL_EXT_draw_range_elements, GL_EXT_fog_coord, 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_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_float, GL_EXT_texture_half_float, GL_EXT_texture_object, GL_EXT_texture_rg, GL_EXT_vertex_array, GL_GL4ES_hint, 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.0 gl4es wrapper 1.1.1 OpenGL ES profile shading language version string: 1.10 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_shader, GL_ARB_framebuffer_object, GL_ARB_instanced_arrays, 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_vertex_array_object, GL_ARB_vertex_buffer, GL_ARB_vertex_buffer_object, 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_compiled_vertex_array, GL_EXT_depth_texture, GL_EXT_direct_state_access, GL_EXT_draw_elements_base_vertex, GL_EXT_draw_range_elements, GL_EXT_fog_coord, 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_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_float, GL_EXT_texture_half_float, GL_EXT_texture_object, GL_EXT_texture_rg, GL_EXT_vertex_array, GL_GL4ES_hint, GL_NV_texture_env_combine4, GL_OES_texture_compression_S3TC, GL_SGIS_generate_mipmap, GL_SGIS_texture_edge_clamp, GL_SUN_multi_draw_arrays

1 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

0x022 24 tc 0 16 0 r y . 5 6 5 8 . . 0 16 8 0 0 0 0 0 0 None

20 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

0xb81003c8 24 sg 0 16 0 r . . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None 0xb81003c8 24 sg 0 16 0 r y . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None 0xb8100478 24 sg 0 16 0 r . . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None 0xb8100478 24 sg 0 16 0 r y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None 0xb8100528 24 sg 0 16 0 r . . 8 8 8 0 . . 0 24 0 0 0 0 0 0 0 None 0xb8100528 24 sg 0 16 0 r y . 8 8 8 0 . . 0 24 0 0 0 0 0 0 0 None 0xb81005d8 24 sg 0 16 0 r . . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None 0xb81005d8 24 sg 0 16 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None 0xb8100688 24 sg 0 16 0 r . . 8 8 8 0 . . 0 32 0 0 0 0 0 0 0 None 0xb8100688 24 sg 0 16 0 r y . 8 8 8 0 . . 0 32 0 0 0 0 0 0 0 None 0xb8100058 24 sg 0 16 0 r . . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None 0xb8100058 24 sg 0 16 0 r y . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None 0xb8100108 24 sg 0 16 0 r . . 8 8 8 8 . . 0 16 0 0 0 0 0 0 0 None 0xb8100108 24 sg 0 16 0 r y . 8 8 8 8 . . 0 16 0 0 0 0 0 0 0 None 0xb81001b8 24 sg 0 16 0 r . . 8 8 8 8 . . 0 24 0 0 0 0 0 0 0 None 0xb81001b8 24 sg 0 16 0 r y . 8 8 8 8 . . 0 24 0 0 0 0 0 0 0 None 0xb8100268 24 sg 0 16 0 r . . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None 0xb8100268 24 sg 0 16 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None 0xb8100318 24 sg 0 16 0 r . . 8 8 8 8 . . 0 32 0 0 0 0 0 0 0 None 0xb8100318 24 sg 0 16 0 r y . 8 8 8 8 . . 0 32 0 0 0 0 0 0 0 None

When i run glxgears, it does run, but frame rate is 20 fps, and when i maximize window, it drops down to 3. So aparently it runs in some kind of software rendering. Now my question is how to check this and get hardware rendering. I have 2 devices to test on: first is tablet with msm8226 snapdragon 400 with adreno 305, second is with MTK P25 with Mali T880. Which parameters shoud i use to compile gl4es and whick libgles libraries should i use, maybe it's mesa ones are software? Thank you.

ptitSeb commented 5 years ago

Yep, mesa will be software rendering only on you hardware. You need to find some mali (I guess?) GLES hardware driver for your hardware.