Graphics accelerated X11 application on i.MX8 based SoM

Hello Ben, welcome to my world!

I assume you copied me on this because I have crawled this particular trail of tears . . . sans the need for any graphics acceleration.

Avoid Qt at all costs. The current definition of “OpenSource” for Qtc is “Everybody has to buy a license” so cost is the operative word.

Search the interest archive: The Interest Archives

=====
March 2021 archive

Yeah, we noticed when QtPdf license changed:
New QtLabs PDF module (LGPLv3)
Change in open-source licensing of Qt Wayland Compositor, Qt Application Manager and Qt PDF (Tukka’s own post)
[Development] [Interest] Change in open-source licensing of Qt Wayland Compositor, Qt Application Manager and Qt PDF (Not everyone was on board with the license change)
But it’s now under the marketplace license?
https://marketplace.qt.io/collections/most-popular/products/qtpdf ($49/ Marketplace license)

Shenannigans. I declare shenannigans.

Yep, Qt’s trying to become smth like Atlasians or alikes…
They (Digia or whoever) are not interested in the technology, they
just want to milk the cash cow with no long term plan.
Once the cows run out of milk, they’ll chop it down like an old dead
tree (Dirty old town).

IMHO, Qt is not a technology to be put in the hands of hedge funds…

=====

For my last project using this hardware I used NanoGUI inside of docker container running pure Buster with X11. I originally tried building NanoGUI native to use the GLES support Wayland claims to have. GLES under Wayland is a cruel and evil joke. The actual application people ended up using Elements also inside Docker container running pure X11.

Wayland is something that never should have been forced onto the embedded world. The medical device and SAFETY critical world long ago eliminated any X11 vulnerabilities . . . we only have a touch screen, no keyboard or mouse . . . TCP/IP is always disabled until we need to make an outbound connection . . . inbound connections are never allowed.

End of vulnerabilities.

If you need accelerated graphics, my first impulse is to say fuggedaboutit. Traditionally the only way to get that is to get access to the hardware. If you want 3d, forget about Qt for any and all lifetimes. 3d support in Qt is looking up at sad hoping to one day be that good.

I do know that FoxGUI (a.k.a. Fox-Toolkit) has some kind of 3d support. The UI library has a very Windows 95 look and feel but that is how it runs on soooo many platforms. I have never tried it on ARM.

CopperSpice does not currently support Wayland or officially support ARM. (Some people claim to have ported it to Apple ARM but haven’t submitted build scripts or pull requests.) You want to keep an eye on this because they forked Qt 4.8 long ago, ripped out all of the icky nasty QML stuff, and started to really make core library improvements.

This dude did an awful lot of research. You can scroll through the post for some ideas.

If you read this post you will get a few more ideas, LVGL being one of them.

NanoGUI was inspired by imGUI. I didn’t experiment with imGUI because I wanted something easier to get through FDA approval. imGUI is immediate mode and focused on gaming.

I’ve not personally coded anything with it, but wxWidgets claims support for Wayland. Naturally there were some issues along the way. I will probably be slapped for mentioning this, but a competitor of Toradex, Variscite, has some kind of tutorial/podcast on getting started with wxWidgets.

Like Qt, wxWidgets is an 800 pound gorilla of a library. I don’t have a publication date, but here is a free 744 page book on wxWidgets cross platform programming.

Unlike Qt and CopperSpice, wxWidgets has a much nicer license. If you (being you and your company) do use it, “you” should kick a few dollars their way.

Best I got on a Monday morning.

Summary

  1. Avoid Qt at all costs with costs being the operative word.

  2. wxWidgets will probably be your most straight forward option if you don’t need sexy widgets by default.

  3. LVGL, and the other immediate mode GUI libraries are worth a quick look at to see if they support both ARM and Wayland directly.

  4. GLES support under Wayland is a joke. Basically, what I found is that all of the other APIs Wayland claims to support in the ARM world is a microscopic fraction of those APIs. Just enough for “Hello World!” and not much more.

  5. Using pure X11 in a Docker container you can get just about any traditional Linux GUI library to work you want . . . sans acceleration.

1 Like