Calling QOpenGLWidget::update() several times normally results in just one QOpenGLWidget::paintGL() call
-
I have implemented a widget, that extends to QOpenGLWidget to display YUV framebuffers & these frame buffers are coming from hardware camera. Implemented YUV to RGB conversion logic inside overridden paintGL() function.
When ever I received a frame from hardware, I will call update() function on QOpenGLWidget & paintGL() function will be invoked by QT. I am getting YUV framebuffers at 60 FPS rate from hardware, So I am calling 60 update() functions in a second. But observed that paintGL() functions aren't called 60 times in a seconds.
I have following two issues:
Update() function does not cause an immediate paintGL()
update() several times normally results in just one QOpenGLWidget::paintGL()
Because of these two reasons some frames are missing to display.I need a function to immediate calling of paintGL() function. How to resolve these issues or is there any other better solution?
-
Hi,
What pipeline are you using to get the data from your hardware to your graphics card ?
-
I have implemented a widget, that extends to QOpenGLWidget to display YUV framebuffers & these frame buffers are coming from hardware camera. Implemented YUV to RGB conversion logic inside overridden paintGL() function.
When ever I received a frame from hardware, I will call update() function on QOpenGLWidget & paintGL() function will be invoked by QT. I am getting YUV framebuffers at 60 FPS rate from hardware, So I am calling 60 update() functions in a second. But observed that paintGL() functions aren't called 60 times in a seconds.
I have following two issues:
Update() function does not cause an immediate paintGL()
update() several times normally results in just one QOpenGLWidget::paintGL()
Because of these two reasons some frames are missing to display.I need a function to immediate calling of paintGL() function. How to resolve these issues or is there any other better solution?
@jaggusri12 A typical solution is just to constantly redraw with whatever the most recent frame is. Effectively a "pull" strategy, rather than "push."