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. Getting delta time of OpenGL in Qt?
QtWS25 Last Chance

Getting delta time of OpenGL in Qt?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 313 Views
  • 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.
  • B Offline
    B Offline
    benjysugi
    wrote on 18 Nov 2022, 20:48 last edited by
    #1

    Hi,

    How would I get delta time/frame time of OpenGL widget in Qt?

    C 1 Reply Last reply 19 Nov 2022, 02:47
    0
    • B benjysugi
      18 Nov 2022, 20:48

      Hi,

      How would I get delta time/frame time of OpenGL widget in Qt?

      C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 19 Nov 2022, 02:47 last edited by Chris Kawa
      #2

      Depends on what you call a frame. Is it the time CPU spends on calculations for displaying, submitting work to the driver, the driver submitting commands to the GPU, GPU executing graphics and compute shaders, presenting a framebuffer to the output device, v-blank interval, v-sync points etc. Different apps different needs.

      If all you want to know is how much time passes between calls to QOpenGLWidget::paintGL then simply create a QElapsedTimer and call its restart() method. It will give you the time elapsed since you last called it.

      1 Reply Last reply
      1

      1/2

      18 Nov 2022, 20:48

      • Login

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