Migration to 6.4.1 and opengl
-
I recently migrated to qt 6.4.1 and understood that opengl is no longer supported. I tried using QSG_RHI_BACKEND as vulkan but the lines and edges are not smooth how it used to be with Qt 5.14.1 and Opengl. I feel maybe something to do with anti-aliasing but i didnt find much help online.
This is how i am setting the env
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
qputenv("QT3D_RENDERER", "rhi");
qputenv("QSG_RHI_BACKEND", "vulkan");How do i smoothen out my edges and lines?
Also using qputenv("QSG_INFO", "1"); gives me the output as
GL Type: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 4.6
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: yesso i am not sure if my application is actually using vulkan
-
@Christian-Ehrlicher i posted because i was looking for answers.
Opengl doesn't provide the same effect as it used to do in Qt 5.14.1 in Windows in Qt 6.4.1 and many documentation of Qt6 referred about opengl being obsolete.
Please correct me if am wrong -
Christian Ehrlicher Lifetime Qt Championreplied to supratik123 on last edited by Christian Ehrlicher
@supratik123 said in Migration to 6.4.1 and opengl:
i posted because i was looking for answers.
But why twice within hours?
referred about opengl being obsolete
Please give the links to the Qt documentation where this is stated.
-
https://doc.qt.io/qt-6/opengl-changes-qt6.html
I am not sure if i understood it correctly*QOpenGL classes migrated
In Qt 5, a replacement set of OpenGL-support classes were added to Qt Gui. This was in order to support OpenGL as the cross-platform graphics API that served as foundation for graphics in Qt.In Qt 6, these have been migrated to the Qt OpenGL module. They are still usable and fully supported for applications depending on OpenGL directly. However, they are no longer considered foundational, since Qt has been extended to support other graphics APIs in its foundation, such as Direct3D, Metal and Vulkan.*
Sorry for reposting again in the forum. Will take this as learning.
Also could you please help me in understanding that if i am using qsg_rhi_backend as vulkan why it is still showing opengl as backend used? Just trying to understand changes
-
@supratik123 said in Migration to 6.4.1 and opengl:
I am not sure if i understood it correctly
You did not. This peace of documentation simply talks about moving OpenGL stuff into another module. Nothing is depricated or "no longer supported".
-
@jsulm the only query i have is if OpenGL is still supported why am i observing kind of jagged lines when i use Opengl? Also am i setting the backend properly like i stated in my code above?