Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Performance issues animating hundreds of OpenGL shapes

Performance issues animating hundreds of OpenGL shapes

Scheduled Pinned Locked Moved Unsolved Game Development
1 Posts 1 Posters 372 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.
  • A Offline
    A Offline
    Alexandre Quessy
    wrote on last edited by
    #1

    Hi!
    I am doing some tweening to animate OpenGL shapes in a QOpenGLWindow, but then I have between 100 and 10000 objects that I need to animate.

    I've used QPropertyAnimation, so far, but the rendering is very, very slow. There is some stuttering in the render, and it seems to use a lot of CPU. Should I use a lower-level approach instead? Is it the fact that I am using Qt properties or the rate of the update of the numbers, that make it slow? Also, I am using one QPropertyAnimation for the x position and another one for the y position of the objects. Maybe I should merge them, or so.

    Here is some of my code: https://github.com/interferences-at/mpop-all/blob/feat-qopenglwindow/mpop_dataviz/prisonerline.cpp#L45 - this link might not be valid anymore in the future, but you might be able to find a similar file name in the same repository under a different branch.

    Instead of using QPropertyAnimation - which is quite high-level, I could use:

    • a single QTimer for all the groups of object that need to be animated;
    • a QEasingCurve for each property to animate

    Would it be more performant this way?

    Thanks!

    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