-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
supports the Rpi 4 with EGL and GLFW. Closes #6436 #6438
Conversation
For the raspberry pi 4 installation Is it possible to also update the file openFrameworks/scripts/linux/debian/install_dependencies.sh The following error still occurs :
changing 'libgles1-mesa-dev' to 'libgles1' solves the problem. |
@kod3000 Thanks for taking a look! I have that change in the install_dependencies.sh here: Hopefully that is addressing what you mentioned. |
Checking in from an RPI 3B+ Without any changes to the makefiles, running the GL Full KMS GL Driver on Buster, graphicsExample compiles and runs from X11. NOT FROM CLI. So, if it's running Buster and the GL driver is enabled, it doesn't matter if it's a RPI3 or an RPI4 (for the makefile target). Using the legacy GL driver, it doesn't work from the CLI (I don't think it's supposed to, either?) and gives the eglSwapBuffer() error as is documented on the forums. Edit: Should I be testing the GLFW mode as well or that doesn't work irrespective as originally commented on #6436 ? Also, Buster onwards, is there still a way to run stuff off the CLI or X11 is the way to go? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TARGET_RASPBERRY_PI_4 macro does seem a bit ad-hoc indeed. I would define TARGET_RASPBERRY_PI for every rpi no matter the version (if it's not already) which should remove most of the #if (!defined(TARGET_RASPBERRY_PI) || defined(TARGET_RASPBERRY_PI_4))
and similar and then define something like TARGET_RASPBERRY_LEGACY which could be use to ifdef out the couple of places where there's code that only works with the legacy driver
apart from that it looks good but would be nice to have it running from console as that's what most people use and it doesn't require a full desktop which potentially uses a lot of extra memory that could be used by applications instead
Thanks @arturoc - I think that all makes sense! In terms of headless. There might be a way via: @sourya-sen Thanks for testing! That should revert to the older approach. Also I am guessing but I think GLFW mode should work for you as well. LEGACY vs NEWER
|
@ofTheo with the GL driver, I have a feeling headless through a VNC might work, I did set up the entire rPi headless through a VNC connection running X11 but I didn't actually check if OF works through that as well, switched to a proper monitor/keyboard combo once OF was compiled. The VNC server comes with the Raspbian distro, just needs to be enabled through raspi-config, through SSH. I can write a full guide if you want, specially if OF works through this approach. I'll give the headless through VNC approach a go tomorrow, as well as the legacy approach with the line commented out - it's pretty late this side of the world right now :) |
Thanks @sourya-sen ! From what I understand VNC can be made to work and ssh -X but having it run without an active connection is harder. I think this might solve that
|
I've just checked out your pull request using the following commands:
it only works here using Desktop and keyboard (not under ssh) |
Thanks @dimitre ! You can then run a headless example with: you get a warning about the gamma ramp not being enabled, but you have a rendering environment and can do GL calls and save out screen grabs etc. Will see if using GLFW fixes the fullscreen and fbo issues you mention. |
@dimitre FBOs and fullscreen works with the GLFW approach. |
FBOs have had issues on the rPi historically when the locale has not been set properly. It could be something similar along those lines, see #5917. I don't think it was ever fully fixed. |
@ofTheo changed to GLFW and FBO is back working |
@dimitre ah yes, I get that error too, but it runs and renders GL calls fine. |
Updated the #defines to be less complex. At the moment for older Raspbian releases you need to uncomment this line: I imagine there could be a way to detect the Raspbian version in the make file and switch automatically, but this is not really my area of expertise and I think it might involve calling some bash scripts from the make file. Maybe for now we could just include information on uncommenting this line in the Raspberry Pi Setup Guide? |
I should finally have access to a pi 3/4 this week. I can give it a run
through and report back.
…On Tue, Nov 12, 2019, 1:02 PM Theodore Watson ***@***.***> wrote:
Updated the #defines to be less complex.
At the moment for older Raspbian releases you need to uncomment this line:
https://github.com/openframeworks/openFrameworks/pull/6438/files#diff-011c6dc421d3f054ec0e4dd9d10683d5R48
I imagine there could be a way to detect the Raspbian version in the make
file and switch automatically, but this is not really my area of expertise
and I think it might involve calling some bash scripts from the make file.
Maybe for now we could just include information on uncommenting this line
in the Raspberry Pi Setup Guide?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6438?email_source=notifications&email_token=AACJLRGYWUNSOANLANEJIDDQTMDWZA5CNFSM4JLBE3E2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED3X33Q#issuecomment-553090542>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACJLRHJOSOE6JTV7TZ3HXTQTMDWZANCNFSM4JLBE3EQ>
.
|
Thanks @bakercp! |
Hey @ofTheo! I haven't had a chance to run stuff on the rPi3 since last weekend but will try to test the newest commits as soon as possible. |
ugg - not sure why these make file commits are failing in the CI. |
I'm using the rp4. I got it to work by cloning straight from github using the branch "feature-rpi4". Everything runs smoothly, the only thing extra that I did was copy the examples folder from the "of_v20191113_linuxarmv6l_nightly.tar.gz" build over to the cloned and ran them. I also installed the "xvfb" but got an error "ofAppGLFWWindow: 65544: X11: RandR gamma ramp support seems broken". I wasn't able to run it headless. Using a keyboard and mouse the compiled examples work as expected. Fullscreen also seems to be functional. I'm going to try a couple of more examples if anything comes up I'll post it up. Thanks for getting this functional :) |
Okay so I think at this point I can get the makefile doing what it needs to and working fine on the CI server. The only thing is it looks like GLFW isn't installed on the Travis image which is being used and because the Debian version is Stretch ( VER_ID 9 ) the makefile is selecting the newer approach with GLFW and then erring when it can't find it. @arturoc what would be the simplest way to add GLFW to the CI server? Locally on the Rpi 4 I didn't even have to include it in the makefile just have it installed at the system level. The other alternative would be to detect that we are running on the CI and disable the GLFW approach, but I think it could be handy to have it use the system most users will be using. |
Okay looks like this is building fine now. If there was ever a need for squash and merge its with this PR! |
The two CI failed checks are just for Android and MSYS2 and are unrelated to the PR so I think this is good to merge finally! |
from what i see the changes to the makefiles are mixing spaces and tabs which is super problematic for makefiles. can you change every new addition to tabs? some very specific lines need spaces though so don't use an autoformater or something that would turn the whole file to spaces please |
@arturoc sure! |
Hi All, I am installing this in class with a student right now and ran into the tabs spaces issue. I'm happy to help, but will let you take a stab at it. Additionally, @ofTheo would you mind setting the permissions back to 100755 on this file?
I had to manually Thx! |
thanks @bakercp - will add that to the PR for the tabs |
I'm back home with access to a RPI4 and RPI3B+, let me know if you need any testing |
This PR adds support for Rpi 4 for both rendering approaches.
Huge thanks to @ThomasColliers who did most of the work in this branch: nondescriptpointer@36fd56f
I just added a define to distinguish between the older models which can use the older EGL method and the newer models which can use both EGL and GLFW with X11.
NOTE: I don't think its possible to run EGL with the old legacy driver from what I was reading in other forum posts.
Things to still check/fix:
Note for anyone wanting to automate the bash detection of Debian version. See this solution ( https://unix.stackexchange.com/posts/6348/revisions )