-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspberry Pi 4 OpenGLES #1171
Comments
Previous Pi's used a non-standard mechanism of getting EGL onto a display (dispmanx). This is a useful thread where these methods are discussed: |
Thanks for the info. I suspect some changes may be needed to SDL to take into account these changes. Until now, the way it's been advised to configure SDL for GLES is to run the following:
That would force SDL to use its "RPI" video driver which I assume does all the EGL->dispmanx handling. Now that EGL should communicate with X11 instead of dispmanx, what I thought would be a sensible thing to do would be to pass Ian |
Just to add, I managed to get around that hurdle by adding |
Adding |
The issue there is that I need GLES 1.1 and that would mean needing |
Are you using SDL or SDL2? If what you are saying is that SDL requires libgles1-mesa-dev to build and libgles1-mesa-dev has been dropped by debian then that isn't a Pi issue and should be brought up with SDL. (the fact libsdl2-dev is in buster suggests this is possible). |
Nope using SDL2. Perhaps I've misunderstood, but I was under the impression that GLES 2.0 dropped all the fixed function stuff and isn't backwards compatible with GLES 1.1? I'm not sure if their opengl_es2 video driver is compatible with GLES 1.1. I'll raise a ticket with them and post back here when I find out more. Thanks for your help @popcornmix. |
So does Wolfenstein Enemy Territory use GLES 1.1 itself? |
The vanilla renderer supports GLES 1.1 using the fixed function pipeline. Nothing is currently in place for GLES 2.0. |
For reference it's Enemy Territory: Legacy that I'm helping with. |
It looks like debian dropped GLES1 support from mesa as no packages (out of 50000+ in repo) used it. I think mesa can be built with GLES1 support but that would require a custom build. Updating rendering to GLES2 might be the best solution. |
I was fearing that might be the case. I will assume that this problem is going to affect the other ID Tech 3 games which support GLES 1.1 too (iortcw. ioq3/OpenArena). Will try them this evening and let you know. |
Just tried iortcw and the game builds and does load, however nothing is displayed on-screen (can hear background music) which I assume is due to the way EGL & X11 must now be setup on the Pi 4. I now need to see which libs & headers iortcw is using when compiling and let the SDL devs know some work is required on their end. |
Huge turnaround - I've got Enemy Territory working. I've linked to the GLESv1_CM library in /usr/lib/ and used the GLES 1.1 firmware headers. It's started up using an X11 window. Going to do some more tests and check I've not done anything perculiar. Getting 60 FPS on average! |
Yep can confirm it's running GLES 1.1 in an X11 window, I get the following returned by the game: GL_VENDOR: Broadcom SDL was configured without any additional flags, so simply |
That's good to hear. That suggests mesa does include the GLESv1 support, but not the |
Thanks @popcornmix I'll close this issue now. |
@techyian I wonder if it would be more correct to use header files from
Then your code would be portable across pre-Buster systems as well as platforms other than Pi that also happen to retain a working Mesa |
I have an issue with selecting the mesa driver on RPi4. I ccompiled mesa with v3d driver enabled, loaded the fkms overlay and ccompiled kmscube. Running the latter fails with:
Switching to card1 fails with:
I have only enabled |
I believe you need to build with v3d and vc4 for Pi4
https://www.raspberrypi.org/forums/viewtopic.php?t=243611#p1486157 |
@popcornmix That makes sense now. I enabled vc4 too (made sure is enabled in kernel as well along with v3d) but it still fails as it falls back to sw renderer:
|
This while Rapsbian does the correct selection:
|
To whoever is hitting this: the missing piece was |
Hi,
I'm looking for some info regarding OpenGLES support on the Pi 4. I've read in the announcement that GLES 3.0 is now supported, but I'm interested in the state of GLES 1.1 on Videocore 6? I'm involved in getting Wolfenstein Enemy Territory working on the Pi and have had success on the Pi 3b+ using GLES 1.1 by linking to the "libbrcmGLESv2" library. However the same setup on the Pi 4 will freeze the game on-start and simply show the black cursor from the game. For info, SDL is used in the backend. I have posted on the Pi forums but solid knowledge regarding GLES support is lacking currently.
Thanks.
The text was updated successfully, but these errors were encountered: