Any OPENGL wizards?
Jim
Please Log in or Create an account to join the conversation.
I'm no opengl wizard, but I had the same problem some time ago.
When I started to add graphic path output to my java app, I didn't want to bother with opengl. So I searched for alternatives.
There where plenty aborted projects, that tried to bring opengl to java. I didn't found any active project on that goal.
Then I discovered jmonkey by accident. It is a platform for game development. Well, I didn't want to create a game, but their hardware abstraction sounded very attractive to me.
So I did some quick tests, that showed, that that project is very fast and usable for painting cnc paths. I had to create some core-classes and implement a different "camera" (in gaming sense), but after few days my gremlin counterpart was working as desired.
May be you find similar projects, when searching for linux game engines
cheers Reinhard
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
the other thing ive been working on, is this, but im stuck between the 2 pi errors . it looks like it can be installed on pi4,
github.com/ptitSeb/gl4es
github.com/ptitSeb/GLU
This is a library provide OpenGL 2.x functionality for GLES2.0 accelerated Hardware (and of course also support OpenGL 1.5 function, sometimes better then when using GLES 1.1 backend) There is also support for GLES 1.1 Hardware, emulating OpenGL 1.5, and some OpenGL 2.x+ extensions.
easiest option, embedded glade tab with gremlin, already works with qtaxis
Please Log in or Create an account to join the conversation.
-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
-opengl desktop -eglfs \
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.
Please Log in or Create an account to join the conversation.
Well The real problem for me is I know almost nothing about opengl.
I just hack things till they work and it's hard dirty work when you get to lower level libraries.
I did look up qglWidget vrs qopenglwidget:
stackoverflow.com/questions/31520371/wha...et-and-qopenglwidget
I wonder if this means changing to qopengl would help?
Maybe making a simple QopenGLWidget program on the pi4 to prove it works?
As I understand it, all linuxcnc opengl programs use legacy code/techniques.
So if we switch to modern libraries, i believe that someone needs to audit and re-code some of the legacy out - I don't know how much work that is.
There is some people working on GTK3 updates to GladeVCP, and my guess is they will need to update openGL too - so maybe more example code.
Chris
Please Log in or Create an account to join the conversation.
QTvcp's graphics display uses QGLWidget
QTVismach uses QOpenGLWidget
Other wise they use the same techniques to create a display.
Could you try QtVismach on the p14?
Please Log in or Create an account to join the conversation.
I have been trying to get qtvismach pan controls working with little success.
I just changed qt_graphics to use the QopenGLWidge and now panning doesn't work.
So now I know I why using qtWidgets code to pan in qtvismach was less successful.
This may be the stuff we need to change for modern libraries.
Now that I found one difference, I am really curious if qtvismach runs on the pi4
Chris
Please Log in or Create an account to join the conversation.
I did write a opengl code in a qt project that works with lcnc.
It parses a simple gcode and then previews it. It's a low level Opengl subclassing example. I think this piece of code will work on any platform, as it is lightweight.
I am alway's avoiding Qopengl, QList, QString etc, in fact i only try to use the Qt as text editor and gui designer.
@Chris,
You did great work in embedding last week !
If i did it again, i would embed the opencascade lib into lcnc or a rasperri pi.
This is so powerfull and fast. Parsing the gcode into it, is more simple then with the opengl lib because
functions to draw circle's, arc's etc are already there. If you then add the CavalarierContours code to lcnc, you have
a nice cam solution, including pocket operations.
Please Log in or Create an account to join the conversation.