Results 1 to 2 of 2

Thread: DPI: VkSurfaceCapabilitiesKHR extents not matching Qt surface extents

  1. #1
    Newbie
    Join Date
    Dec 2018
    Posts
    1

    DPI: VkSurfaceCapabilitiesKHR extents not matching Qt surface extents

    Hello,

    When using high-DPI settings I noticed that the VkSurfaceCapabilitiesKHR currentExtent, minImageExtent and maxImageExtent are sometimes a pixel less in their dimensions than the computed value of Qt using AA_EnableHighDpiScaling ( QWindow::size() * QWindow::devicePixelRatio() ).
    If I use Windows' SetProcessDPIAware() instead then the dimensions seem to be fine.

    For example:

    width()=224
    devicePixelRatio()=2.0
    => scaled width = 448
    but currentExtent.width = 447

    Why is Vk rounding down ? Is there a way to get the dpi scaling factor Vk is using ?

    Best Regards, Megamouse

  2. #2
    Senior Member
    Join Date
    Mar 2016
    Posts
    334
    Hm, what does GetClientRect return?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean