detonator icon indicating copy to clipboard operation
detonator copied to clipboard

Add support for high DPI display rendering

Open ensisoft opened this issue 4 years ago • 1 comments

Add support for high DPI display scaling.

What this means.

  • rendering resolution and render target size are no longer the same as the display/presentation size.

  • the display window can be scaled either manually or by the underlying platform.

  • the content rendered by the engine needs to be displayed with some scaling factor/mechanism

    • render to a offscreen render target and then rescale and resample in order to display in the window
    • maintain aspect ratio or stretch
    • platforms (such as Windows) can do some up scaling automatically (probably not ideal results)
  • need engine config flags to define the setting for hdpi

  • need runtime game accessible way to access the hdpi display scale factor

  • need runtime mechanism for letting the game to adjust the hdpi display scale factor

Also applies to fullscreen not just windowed mode.

ensisoft avatar Dec 02 '21 19:12 ensisoft

Currently the windows native game host application is DPI "unaware". When the application runs Windows does content scaling automatically (at least in the windowed mode).

https://learn.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows#display-scale-factor--dpi

ensisoft avatar Aug 22 '24 16:08 ensisoft