I am trying to capture rendered image( developed in Qt's QML qquickrendercontrol example) using framebuffer with OpenGL API "glReadPixels" but it takes 1.8 seconds to read the pixel data. which is not acceptable, since i need the image capture at least 100ms. I have binded the OpenGL using texture ID. I have no issue while rendering, it so fast. While I am running same application in PC(Core i5 ) it takes 11 to 15ms to capture the same image. But when it comes to IMX6 capturing takes 1.8 seconds.
I have used following API's but all it takes 1.8 seconds
1. Using direct openGL API glReadPixels
2. QOpenGLFramebufferObject:: toImage()
3. grabToImage() API of QML Item.
or
Is there any other workaround to capture the framebuffer without blocking the rendering thread?