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?
Forum Updated to NodeBB v4.3 + New Features

Getting delta time of OpenGL in Qt?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 425 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.
  • benjysugiB Offline
    benjysugiB Offline
    benjysugi
    wrote on last edited by
    #1

    Hi,

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

    Chris KawaC 1 Reply Last reply
    0
    • benjysugiB benjysugi

      Hi,

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

      Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 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

      • Login

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