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. QOpenGLWidget creates 6kx3k fbos on macOS with 4k display

QOpenGLWidget creates 6kx3k fbos on macOS with 4k display

Scheduled Pinned Locked Moved Unsolved Game Development
2 Posts 2 Posters 533 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 (with the window maximised) 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. This causes an internal resolution of 6720 * 3780 and this is killing performance. I've been poking around in the code of QOpenGlWidget and had some some success getting some performance back by removing this scale when QOpenGlWidget 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 QOpenGlWidget 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,

      Please do not post the same question in multiple sub forum. One is enough

      Duplicate

      Closing this one

      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