Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Calling QOpenGLWidget::update() several times normally results in just one QOpenGLWidget::paintGL() call
Forum Updated to NodeBB v4.3 + New Features

Calling QOpenGLWidget::update() several times normally results in just one QOpenGLWidget::paintGL() call

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 364 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jaggusri12
    wrote on last edited by
    #1

    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?

    W 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What pipeline are you using to get the data from your hardware to your graphics card ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J jaggusri12

        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?

        W Offline
        W Offline
        wrosecrans
        wrote on last edited by
        #3

        @jaggusri12 A typical solution is just to constantly redraw with whatever the most recent frame is. Effectively a "pull" strategy, rather than "push."

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved