Page 1 of 1

qmltoqt6 branch

Posted: Mon Sep 02, 2024 2:15 pm
by Ledjlale
Hello,
What is the status of this branch? It isn't up-to-date.
I'm mostlty working with Qt6/qml so I could give an hand on this.

Re: qmltoqt6 branch

Posted: Tue Sep 03, 2024 6:45 am
by mcallegari
Hi, thanks for the rebase.
The purpose of that branch is to port the QML UI to Qt6.
There are a few QML specific changes to make, especially on native dialogs, but the most critical part there is the 3D preview.
The Qt company is basically not maintaining anymore the Qt3D module. They are rather working on Quick3D but our analysis proven that there is no feature-parity between the two modules so we can't port the rendering pipeline as it is.

In other words, at the moment QLC+ 5 on Qt6 is unusable. :(

Re: qmltoqt6 branch

Posted: Tue Sep 03, 2024 7:27 am
by Ledjlale
It is what I noticed : the 3D preview is all black on my Fedora. I'm investigating it and try to understand why a simple SceneEntity animation works fine while it is not the case with the SceneEntity defined into the project.
Alos, https://github.com/mcallegari/qlcplus/pull/1558 was a WIP and contains many fixes on callbacks depreciations ('onFunction: (var_1,...,var_n) =>{ todo();}'). Was there a reason to not backport them?

Re: qmltoqt6 branch

Posted: Tue Sep 03, 2024 1:50 pm
by GGGss
mcallegari wrote: Tue Sep 03, 2024 6:45 am The Qt company is basically not maintaining anymore the Qt3D module. They are rather working on Quick3D but our analysis proven that there is no feature-parity between the two modules so we can't port the rendering pipeline as it is.
Ow may ...
Is there a branch of some sort to rule this out?

Re: qmltoqt6 branch

Posted: Tue Sep 03, 2024 9:44 pm
by Ledjlale
Screenshot from 2024-09-03 23-31-32.png
hmmmm there are no comments so it is a bit hard to understand all the process ^^ but I think I have a lead .... :oops:
Qt6 use RHI by default for its qml view. Some hints propose to force to openGL but it goes nowhere.

Code: Select all

QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
qputenv("QT3D_RENDERER", "opengl");
But If I replace the Materials defined in the project by a Material defined by Qt (For example, by replacing the GeometryPassEffect -that is the effect passed to the Entity- into the StageSimple by PhongMaterial), I got the scene displayed.
It seems to be "just" the shaders that need to be rewrite a bit to be compliant with 450 (RHI): The screenshot comes from the geo.vert/frag splitted into es2/gl3/rhi applied to the StageSimple Entity. That gives an idea.

Re: qmltoqt6 branch

Posted: Wed Sep 04, 2024 7:15 am
by mcallegari
See https://github.com/mcallegari/qlcplus/pull/1463
We already attempted the port of the 3D view to RHI but there were issues with the layer filtering.
Forcing OpenGL on RHI, instead, should still work but I haven't tried it myself yet.

Re: qmltoqt6 branch

Posted: Wed Sep 04, 2024 5:29 pm
by Ledjlale
Screenshot from 2024-09-04 19-25-16.png
Is it not better? :D

In fact, I gone too far.... After your answer on "Forcing OpenGL on RHI, instead, should still work but I haven't tried it myself yet."
I restarted from scratch from the qmltoqt6 with only few changes that are not related to 3D.

I confirm that it works..

Code: Select all

QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
qputenv("QT3D_RENDERER", "opengl");
What is exactly missing in the 3D view?