Re: [Interest] Porting Qt5 OpenGL app to Qt6 - QQuickRenderTarget and OpenGL frame buffer object

2024-05-15 Thread Nuno Santos via Interest
Lazslo, Thank you very much for your prompt reply. If I will be doing this very very regularly, should I keep an instance of the FBO instance of creating and deleting all the time? Best regards, Nuno > On 15 May 2024, at 15:46, Laszlo Agocs wrote: > > > Hi Nuno, > > You can always create

Re: [Interest] Porting Qt5 OpenGL app to Qt6 - QQuickRenderTarget and OpenGL frame buffer object

2024-05-15 Thread Laszlo Agocs via Interest
Hi Nuno, You can always create an FBO on the fly for the purposes of the readback. For example, something along the lines of: glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_FRAMEBUFFER, fbo); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0); glReadPixel

Re: [Interest] Porting Qt5 OpenGL app to Qt6 - QQuickRenderTarget and OpenGL frame buffer object

2024-05-15 Thread Nuno Santos via Interest
Laszlo, I have a new problem regarding this question. I have a QQuickRenderControl in order to do a side render and be able to extract the render output. I was reading from the FBO using the glReadPixels function. But now the render target is a OpenGL Texture but apparently the function that