Render QML onscreen and save video offscreen simultaneously (OpenGL ES 2.0)
Asked Answered
P

1

7

I am trying to achieve a 30 fps screen recording (of a QML scene) while also rendering the same QML scene to my display. So far I have followed (http://blog.qt.io/blog/2017/02/21/making-movies-qml/) and have been able to achieve onscreen and offscreen rendering by use of two QML engines. The issue is that any saving method with calls to glReadPixels (QOpenGLFramebufferObject->toImage) will block the onscreen rendering.

I've learned a way to get around this is to use pixel buffer objects (pbo) to achieve asynchronous transfers; I have achieved this on my Desktop platform but I need a solution for my embedded platform which has OpenGL ES 2.0 and QT 5.7.1.

Is there any other way to use frame buffer objects or textures to achieve this goal? Is there a way to copy the texture / color attachment in the GPU memory space and transfer the image back in chunks?

Thanks,

Piddock answered 2/8, 2017 at 13:39 Comment(0)
C
0

Most embedded platforms use a unified memory architecture, so it's entirely possible that the glReadPixels approach won't trigger nearly as much overhead. You're probably still better off using a ring of buffer textures that are copied from the actual framebuffer texture and then have fences protecting the reads from those, but you're not going to have the same issues that arise from crossing the CPU / GPU memory boundary on desktop platforms.

Carlenecarleton answered 1/11, 2022 at 19:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.