Open clort81 opened 3 years ago
Hello.
First of all, impressive work !
Some hints what I'd try:
1) Try to build SDL2 on linux host with GLES backend and use software rendering, to "emulate" the device's environment on a build host. If you encounter the same problem on the host, it will be much easier to debug.
2) Try to lower the resolution to e.g. 320x240 to reduce the amount of pixels drawn, maybe it will load that way
But 4 fps in the menu screen (where there are just a few drawn primitives and no logic) is abit awkward :smile:
Good luck !
Nothing impressive by me. Maemo-leste runs the same devuan OS as my desktop. :1st_place_medal: I just set the resolution to 960x540 in the config and compiled with no changes. You did a good job making menu UI fit the varying resolutions.
I didn't know you had a gles backend! Woo Woo! :dancers:
The 4fps was running the actual game with mesa software rasterization.
Well, OpenClaw does not use any lower layer GL backend directly - it uses SDL2 which can use OpenGL (generic linux), DirectX (generic windows) backends, so my guess is it can be compiled with GLES backend also
Does this mean the compositing of sprites in-game is done by cpu?
I have a build running in-game now but fps is around 4. I tried profiling but appear to run out of memory.
No no, both OpenClaw desktop and web builds use graphics card for rendering - on my PC I get 1800 FPS :-)
What I meant is that you can build SDL2 library in different ways - on windows it is by default with DirectX rendering backend, on Linux it is by default with OpenGL rendering backend (maybe you can select Vulkan renderer now also) and for embedded devices it should be GLES rendering backend by default.
Our drivers only natively support opengl-es 2. Opengl is provided by ptitSeb's gl4es shim.
I think SDL2 is prioritizing opengl over opengl-es backend, and this ought to be overridable by an envvar - but it isn't. I think Sam Latinga assumed opengl would always be preferable to -es.
[edit] libSDL2 has this: SDL_HINT_RENDER_DRIVER="opengles2" https://wiki.libsdl.org/SDL_HINT_RENDER_DRIVER
I guess this is not an OpenClaw issue anymore but it was nice to chat with you.
Interesting. As you say, this is most likely device+platform specific issue which I unfortunately can be of little help.
If you run into any other problem with which I may help you in some way, feel free to message me or create another issue :-)
I'd also be glad if you could share your progress, I'm always happy when people get it running on some exotic platform :smile:
Hi pjasicek! AWESOME work! So well done. \o/
Even runs on my Motorola Droid 4 (2011 phone) under Maemo-Leste!
[In-game. not menu] Gets about 4fps with mesa software rendering. Switching to opengl, with gl4es the start menu runs fine, but as soon as game is started gl4es segfaults.
Perhaps it's a simple fix since menu code works fine. Possibly related to mipmap? I don't see a need for mipmaps.
[EDIT] export LIBGL_MIPMAP=3 gets me past the segfault but white-screen in-game :)
looks like it's running - 94% cpu.