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.

Home Page:http://ptitseb.github.io/gl4es/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[How to debug] gl4es on termux

IntinteDAO opened this issue · comments

I have a problem that I would like to report, but on the technical side everything is ok. It is about Termux (without any Chroots, turnips etc).

In theory Termux has access to GLES. So using gl4es should be possible, and the package itself is in the Termux repository.

Unfortunately, what happens in my case is that while gl4es officially works, the image to be rendered - does not display. Usually it is a black screen or the desktop is displayed instead of the game.

On the other hand, there is nothing on the output except that GL4ES works. It looks like everything is working correctly and the image is not displaying (e.g. in glxgears the FPS in output is displayed, but there are no gears).

Is there a super debug mode?

You can build gl4es with debug, and it will send to the console tons of info, but I'm not sure you need to debug on gl4es side. Maybe try to do a capture of gles command on native side (with renderdoc or something similar?).

I will try to recompile Renderdoc.

Generally llvmpipe works, but very slow. I also don't know if gl4es will work properly after the image transmitted over VNC. And it would be nice if it would work everything perfectly.

Anyway thanks, I will try to build gl4es with debug options and compile renderdoc and write issue then.

@IntinteDAO what hardware are you running?

llvmpipe is slow because its the software pipeline, ie it does not use hardware acceleration.

Note that there is no problem showing GL over VNC, ie if its not showing on VNC client, its because its not showing VNC server (machine/OS).

EDIT: if you recompile and you have further question, add them to this thread/Issue.

@paulwratt It's Motorola Moto G100 with LineageOS 14.1 I think (Android 12).
On this I run Termux and TigerVNC as a X11 Server, and using AVNC I connect to it.

This is the Log I had when starting the trigger-rally game (without debugging)

LIBGL: Initialising gl4es
LIBGL: v1.1.5 built on Sep 19 2022 12:18:47
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: 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_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_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: Extension GL_EXT_color_buffer_half_float  detected and used
LIBGL: high precision float in fragment shader available and used
LIBGL: Max vertex attrib: 32
LIBGL: Extension GL_OES_standard_derivatives  detected and used
LIBGL: Max texture size: 16384
LIBGL: Max Varying Vector: 31
LIBGL: Texture Units: 16/16 (hardware: 16), Max lights: 8, Max planes: 6
LIBGL: Extension GL_EXT_texture_filter_anisotropic  detected and used
LIBGL: Max Anisotropic filtering: 16
LIBGL: Max Color Attachments: 1 / Draw buffers: 1
LIBGL: Hardware vendor is Qualcomm
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: Not trying to batch small subsequent glDrawXXXX
LIBGL: try to use VBO
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/usr/share/games/trigger-rally
Trigger Rally init
Build: 0.6.6.1 on Sep 20 2022 at 13:38:28
Initialising PhysFS
Setting writable user directory to "/data/data/com.termux/files/home/.local/share/trigger-rally/"
Application base directory "/data/data/com.termux/files/usr/share/games/trigger-rally/"
Loading game configuration
Automatic video mode resolution: 1920x1080
Failed to add PhysFS search directory "../data"
PhysFS: 11 - not found
Failed to add PhysFS search directory "C:\Program Files\Trigger Rally\data"
PhysFS: 11 - not found
Failed to add PhysFS search directory "/usr/share/games/trigger-rally"
PhysFS: 11 - not found
Failed to add PhysFS search directory "/usr/local/share/games/trigger-rally"
PhysFS: 11 - not found
Create window and set video mode
Desktop video mode resolution: 1920x1080

And is there a tutorial for this? :P I generally compiled gl4es with CMAKE_BUILD_TYPE=Debug, but that's not the issue, because no new logs appeared

No, you have to configure with -DDEBUG=1 or uncomment the DEBUG line in the top of each file to have less debug info.
Building with DEBUG macro will generate a lot of logs

It's fixed - closing