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. QOpenGLWidget creates 6kx3k fbos
Forum Updated to NodeBB v4.3 + New Features

QOpenGLWidget creates 6kx3k fbos

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 633 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.
  • N Offline
    N Offline
    NeilW
    wrote on last edited by NeilW
    #1

    Hi,

    I'm working on an OpenGL game and i've encountered a performance issue when using a mac, with a 4k display.

    When I'm running my game on a 4k display in non scaled mode I have a viewport resolution of resolution of 3840 * 2160 and Qt internally renders at this resolution. This is a 1:1 to resolution of my monitor and my game renders fine. But when I run the game at a lower resolution 3360 * 1890 high DPI scaling kicks in which causes an internal resolution of 6720 * 3780 and this is killing performance. I've been poking around in the code and OpenGlWidget and had some some success getting some performance back by removing this scale when OpenGlWidget renders to its fbos - but the underlying surface still has a the *2 scale applied.

    I understand why you would want to render at a high dpi for text, buttons etc, but for an opengl viewport in a game - it's totally overkill.

    Is there a way to disable scaling on a OpenGlWidget so that it internally always renders as the native resolution.

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You should add which version of Qt you are using as well as version of macOS.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NeilW
        wrote on last edited by
        #3

        I'm using macOS 10.15.8 and QT verisons 5.15.0 and 5.15.2 - both versions have the same issue.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you provide a minimal example that shows this behaviour ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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