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. If VSync on refresh rate divided between QGLWidgets
QtWS25 Last Chance

If VSync on refresh rate divided between QGLWidgets

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.6k 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.
  • I Offline
    I Offline
    Irispalida
    wrote on last edited by
    #1

    Hi,
    I need many QGLWidget subclass instances, lets say up to 16 so far, in my application on which is being painted video. No mater If I set swap interval with setSwapInterval() to 0 or 1, the VSync is always on unless turned off with nvidia-settings before start of my application. Now the problem is the refresh rate isn't 60 fps on each QGLWidget, but is divided between them. That means when running one QGLWidget at time its refreshed with 60 fps, two are refreshed with 30 fps each, four with 15 each and so on. So when running 16 QGLWidgets refresh is 3.75 fps and that really sucks. The graphics card is not the bottleneck, because its loaded up to 10% and almost no traffic on bus.

    On the other hand when VSync is turned off in nvidia-settings each QGLWidget is refreshed with 60 fps, but the video is tearing heavily.

    Have anyone experienced the same weird behaviour?

    Thanks for any suggestions!

    Ubuntu 13.10
    Qt 5.2
    Nvidia NVS 510/PCIe

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Soraltan
      wrote on last edited by
      #2

      Hi,

      I have no experience with it. But what you described brought to mind (kind of) what I wasted my own day with. And maybe this helps:

      Have you tried using the OpenGL graphicsystem for all of Qt (not just the QGLWidgets? This can be accomplished my passing -graphicsystem opengl as command line arguments. Alternatively there is a way to accomplish the same by a call of a QApplication method which I can't recall right now.

      I'm not sure if it helps, but what you describe sounds as if the frames where distributed between the QGLWidgets. So having OpenGL render all of it anyway might help. So really just a suggestion.

      Soraltan

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Irispalida
        wrote on last edited by
        #3

        Hi,
        do you mean QApplication::setGraphicsSystem? If so, its deprecated and no longer available.

        But anyway thanks for reply!

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Soraltan
          wrote on last edited by
          #4

          Yupp, that's what I meant. Sorry, didn't read that you were using Qt5.

          Edit: Anyway is there no way to get OpenGL rendering for the entire application in Qt5?!? I haven't worked with it so far.

          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