qtvismach got me in to mood to fight this again. what ive got so far is, that qt5 graphics should work on the rpi4.
-rpi4 can handle openGL 3.3, the whole thing between opengl and opengles on the rpi4 has to do with the GPU and its drivers, which are now openGLES 3.1 compliant. when not using the rpi4 specific GPU drivers, the software graphics drivers(the mesa lib i think) are capable of doing openGL 3.3, so this shouldnt be the issue
-qt5 graphics sends errors on things that the other gui do not (glgenlist for example), so thats not the issue,
but even if you remove glgenlist, it just goes through every gl/glu thing not defined in opengles
so that eventually led me to these 2 bug reports
bugs.debian.org/cgi-bin/bugreport.cgi?bug=895499
this 2d robot simulation program has almost identical issue we do. an existing software wont run cross platform, with a similar error on glgenlist
The root cause is that on armel/armhf (and arm64 in Ubuntu)
Qt5 is compiled with OpenGL ES instead of OpenGL.
enki-aseba should be fixed to build and work with OpenGL ES,
but if this is not easily possible please
- change the build dependency from libqt5opengl5-dev
to libqt5opengl5-desktop-dev, and
- file a removal bug for the old armel+armhf binaries
of enki-aseba and aseba against ftp.debian.org
which led me to the split between libqt5opengl5-dev and libqt5opengl5-desktop-dev,
bugs.debian.org/cgi-bin/bugreport.cgi?bug=881943
Different from other architectures, on armel and armhf
Qt in Debian is configured to use OpenGL ES instead
of full OpenGL.
Some OpenGL-related functionality in Qt is not available
with OpenGL ES, and Qt also offers direct access to OpenGL.
This causes some packages to not build with libqt5opengl5-dev
on armel and armhf, and while making them build would obviously
be the best solution that is not feasible in cases where
upstream does not provide any way to disable this kind of
OpenGL usage or has alternative OpenGL ES codepaths.
A package that does FTBFS on armel+armhf buildds after every
upload is not ideal - it wastes buildd resources and makes
it harder to find bugs between the expected FTBFS.
so, qt5 is configuring to build for openGL ES because we are running ARM ,
but the qt5 graphics, uses QGLwidget, which seems like a hard openGL widget, and not the cross platform QOpenGLwidget.
I think what needs to happen, is a custom configuration of qt5 for linuxcnc rpi4. still dont know all the details yet, or weather or not i need to totally rebuild qt5 or what, but here is the CFLAG we need to change/add
Code:
-opengl desktop -eglfs \
probably not the only thing we need to configure but thats the big one i think.
i think this should load the libqt5opengl5-desktop-dev(which uses full opengl instead of libqt5opengl5-dev ( which forces arm to use opengles)
github.com/koendv/qt5-opengl-raspberrypi
here is what ive got so far for references, but most people are trying to do this to run qt in a non windowed environment so my results are getting diluted . its essentially what cmorley has said every time it comes up "qt5 graphics is based off previous code" "probably calling the wrong library" something to that tune
Does any of this sound plausible?
If anyone else would like to try and test this out over the holidays, that would be helpful.
cmorley - if lack of rpi4 is the only thing holding you back, that is one problem i can solve (with the help of canakit). If you arent interested, I completely understand.