I recently installed julia 1.6.7 on a Raspberry Pi 400 computer as that was
what was available from julialang.org downloads.
When I tried to install GLMakie which is my preferred plotting program, it
failed at precompile. The error was that OpenGL 3.3 was not available for
the RPi 400 platform.
I was able to force using the software Mesa rendering and successfully
use GLMakie. However, it is very slow and won’t work for the live update
application that I am working on.
I see from some discussion on the rpi web sites that there has been work
to get OpenGL 3.3 running on the RPi 4 family (including the RPi 400).
I had some questions:
What specific features from OpenGL 3.3 versus OpenGL 3.2 are needed?
It seems like EGL is becoming a more common standard for OpenGL-type
functionality. Is there a way to substitute that for OpenGL?
Has anyone successfully gotten GLMake working for the RPI?
I’ve seen WGLMakie suggested but did not want to change platforms and
API support if it is not needed. Anyone have luck with this approach?
I was able to install julia-1.10.4 and julia-1.11.0-rc1 on my raspberry pi 400:
I had to increase the swap file size. 2000MB seems to work.
A size of 1000MB barely made it but I had to close my browser
to avoid running out of memory.
Ran julia with the environment variable LIBGL_SOFTWARE_ALWAYS=1
and everything thing built (with julia-1.11.0-rc1)
Software rendering is slow but the 64-bit OS version is a bit more zippy
that my previous experience with julia-1.6.7 and the 32-bit Raspberry OS.
This Makie backend might then work, mostly made for AMD/ray-tracing but not just:
RPR.Hybrid: Vulkan backend, fit for real time rendering, using AMDs and NVIDIAs new hardware accelerated ray tracing. Doesn’t work reliably yet and only works with RPR.Uber material.
RPR.HybridPro: The same as Hybrid, but works only for Radeon GPUs, using AMDs own hardware acceleration API.
[I would be very curious to know if this works for you, but it’s not ideal since only at best for Pi 4/400, not older.]
I believe you already got CairoMakie to work. It only supports 2D, and with same API I believe. GLMakie and the other support 2D too, but additionally 3D, well seemingly what you want. There are also other non-Makie plotting options giving 3D (these Plots.jl backends, or using them directly “GR, PythonPlot, Plotly(JS), Gaston”). Might work for you, possibly better/not as hardware demanding code. Makie is seemingly the future, thus ideally it would work for all hardware…, with some of its backends. What’s your reason for wanting GLMakie? I see it’s supported by Mousetrap.jl (its only 3D/Makie option?).
Is there a possible OpenGL-to-OpenGL ES adapter available? Software based, I think there might, not though sure about for the Pi. Or to Vulkan for option 1.
Port GLMakie to OpenGL ES. I’m not sure how easy.
Porting OpenGL to OpenGL ES
Since OpenGL ES is missing the immediate mode and does not support quads, we have to create triangle arrays.
I’m looking for a lightweight, realtime, interactive graphics display with 2-D figures
and 3-D renderings. GLMakie was the only version that fit the requirements. I did
not think that the RPRMakie was relevant to the RPi-400 hardware.
As is, I’m stuck with the software rendering pipeline until OpenGL 3.3 support
is available for the RPi-400 or Makie targets some graphics API supported by the Pi.
Maybe OpenGL ES could be that option.
I have an application that does use GLMakie that I am trying to use on the RPi 4 8GB. It is complaining that it will not compile. Doing some reading I found a reference that claims to make it work. They seem to prefer Manjaro Arm or Ubuntu for the PI, I am running the latest 64 bit RPi OS, Bookworm.
I am wondering if anyone has tried this out for any OS on the Pi and what their experience is. I am particularly interested in whether someone has made it work for the Raspberry Pi OS.
You could try first to get WGLMakie runnning, to see if there’s any basic problems without OpenGL.
It might be the better solution in any case, since the opengl acceleration on the PI wont be great even if you get it running.
95% sure WGLMakie shouldn’t pull in any OpenGL related things, so I think it must be something with the environment…
Maybe Electron somehow got in there? But I would think that will only start erroring once you start Electron.
Or did you maybe also had GLMakie in the repository? That already needs OpenGL while precompiling…
Some more experimenting… I have Firefox set up as the default browzer for the Pi. When I execute the 'lines(x,y)` statement, Julia will hang if the browzer is not already up on the desktop. If it is already up on the desktop there is no problem. The same problem does not exist if I make Chromium the default browzer.
Neither browzer shows the numbers on the x or y axis with WGLMakie.