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. How to enforce vertical synchronisation with the new Qt5 OpenGL API
QtWS25 Last Chance

How to enforce vertical synchronisation with the new Qt5 OpenGL API

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.4k 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.
  • E Offline
    E Offline
    exophoric
    wrote on last edited by
    #1

    Typical OpenGL applications can enforce vsync (sync to video blank / vblank) to avoid screen tearing, using some window server specific extensions. The "swap_control" extensions does the trick, providing some platform specific function calls: glxSwapIntervalEXT on Linux X11 or wglSwapIntervalEXT on Windows, as stated by "OpenGL Official Wiki":http://www.opengl.org/wiki/Swap_Interval

    Qt5 offers an new method to acquire an OpenGL context. This method is well described by the "OpenGL Window example":http://qt-project.org/doc/qt-5.0/qtgui/openglwindow.html . However, using the new API of Qt GUI, it doesn't seem possible to enforce vsync using a swapInterval(1) call. The example suggests that the user must set the option in their video card driver configurations. Although, this is not acceptable for me.

    How should we enforce vsync with the new Qt5 QtGui OpenGL flavor?

    Thank you,

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      Indeed this looks to be missing. Please file a feature request at bugreports.qt-project.org.

      As a work around you will need to call the appropriate wgl/glx function yourself I'm afraid.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • E Offline
        E Offline
        exophoric
        wrote on last edited by
        #3

        Already filed and resolved :) QTBUG-31770

        Planned for Qt 5.3.0 release!

        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