PinePhone Graphics support (OpenGL ES 2.0 Mesa 20.1.5)

Reporter: time-killer-games  |  Status: open  |  Last Modified: September 04, 2021, 04:39:26 pm

After a bunch of errors I get a solid fill color window. Nothing else. ENIGMA supports all the specifications for getting its games running on the pine64.org manjaro / whatever edition pinephone, except the graphics we need are:

  • OpenGL version string: 2.1 Mesa 20.1.5
  • OpenGL shading language version string: 1.20
  • OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.1.5
  • OpenGL ES profile shading language version string:
  • OpenGL ES GLSL ES 1.0.16

Are there any plans to support this? Running games built with our current OpenGL ES 2 graphics system throws errors in terminal / zeniy / kdialog saying apparently we are using OpenGL ES 3 dependent code in our OpenGL ES 2 system and this really shouldn't be the case not just for PinePhone but also for better Android support.

Screenshot_2020-09-06_19-55-44
Screenshot_2020-09-06_19-56-04
Screenshot_2020-09-06_19-56-47
Screenshot_2020-09-06_19-57-07

time-killer-games  
ENIGMA games look as they should on the PineBook Pro when I switch to use OpenGL 1.1 but the PinePhone as well as most other arm64 architecture devices do not support anything but some common version of OpenGL ES (v2+). Using OpenGL 1.1 on the PinePhone results in a glitchy renderization of sprites and all other visual elements which kills it.
fundies  

We haven't removed all the gles3 functions from gles 2 yet. It shouldn't take a ton of work but I'm not super fluent in opengl so I can't be bothered. You may have some better luck with this pr though: #1903
time-killer-games  

Thanks a ton! I'll give that a try.

As a side note, if there is already an issue for OpenGL 3 code used in 2, this ticket can be closed.

fundies  

Do you want to try this again now that android stuffs been merged?
time-killer-games  

Do you want to try this again now that android stuffs been merged?

Yeah that's awfully nice of you to suggest this, does anyone get on ENIGMA's irc channel anymore? Maybe you and/or whoever else would be willing to help could chat with me on there?

time-killer-games  

Do you want to try this again now that android stuffs been merged?

Also, on a slightly different subject, I'm going to unblock you if you'd rather talk on discord, I just wasn't sure if you wanted me to contunue contacting you on there, but I have a game that I programmed for a client in GM that I got working in ENIGMA (with the help of my video player extension from my fork), and its a really really good game. If I get my client's permission, since he is the copyright holder, would you, Robert, and Josh like private access to the source code + binary for occasional regression tests to do against the game manually? Unfortuneately, he doesn't want the game to be published in any way publicly, whether in source or binary form, so it can't be a CI test, but it is a nice game to test regressions for when done hands on, since you can't do it with CI for those reasons.

imo, the more games we can do this with, the better. and since it requires my libwebm extension, I'm happy to open a pr to get that into master, so it's not just in my fork, and you guys can actually make use of that project. This would be a great game to port to mobile anyway, since it was originally designed to run on mobile exclusively and is still available on google play.

https://drive.google.com/file/d/1davVngfwzSBaB8vSyA7Ht-SanglPVkea/view?usp=sharing

fundies  

Freenode was taken over by infidels so the irc is dead. The Android PR has been merged to master so it should be as simple as redoing what you did last time.
time-killer-games  

Since the pinephone is linux anyway, it should be as simple as building with SDL2 and OpenGL ES 2 and transferring the binary to the phone while installing the deps on it, so it's more familiar than the android process, though that too has the wiki thanks to you and hugar. So yeah, I'm down to try it again.
time-killer-games  

If I get it working on the pinephone, would it be worth mentioning enigma on the pine64 forum? I think a lot of the devs over there would like it,
IntinteDAO  

Tomorrow I should get the Pinephone, I'll be able to test the Enigma and at the most send some information about it to a few places :P
IntinteDAO  

@fundies @time-killer-games

Sorry for waiting. The problem probably's still exists
https://0bin.net/paste/acwrT2K-#Xo3hXQJgnYDO8NNG46vm7GawAehQJpoNOJqWo8b+I0I

In theory compilation on Pinephone went "good", but binaries have 0 Bytes and Shader return a big log error

fundies  

What version of gles shaders does the phone support?
IntinteDAO  

OpenGL version string: 2.1 Mesa 20.3.5
OpenGL shading language version string: 1.20
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.3.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16

The problem might be with GLES implementation:
https://wiki.debian.org/PanfrostLima

 However, incomplete support for OpenGL and nonexistent support for Vulkan may be a concern for some use-cases.

fundies  

Are you on discord. I have something to try?
Please sign in to post comments, or you can view this issue on GitHub.