Rendering a simple red background using QOpenGLFramebufferObject in QML and using Opengl
-
wrote on 20 Apr 2024, 04:13 last edited by
Hi,
I am trying to understand how to render some stuff onto QML using Qt6 with Opengl based on this blog post that was in 2015
I have tried but i couldn't get it to render anything. Wondering if there is anyone who is able to guide or point me to the right direction.
This is the link to my sample code (Qt creator 12.02, Windows 11)
https://drive.google.com/drive/folders/1tTS3a49nzF4j2pnyhG5UE8zfPoNbndec?usp=sharing -
wrote on 22 Apr 2024, 01:05 last edited by
Hi, i have tested the exact same code for both Qt 5.12 and Qt 6. For 5.12 it's working but for 6 it is not working
-
Hi, i have tested the exact same code for both Qt 5.12 and Qt 6. For 5.12 it's working but for 6 it is not working
Hi,
Based on the class documentation, the class is legacy and will only work if OpenGL is used in the backend.
Try running your application with the
QSG_RHI_BACKEND
environment variable set toopengl
.For example:
QSG_RHI_BACKEND=opengl appopenGL
.
1/3