Skip to content

core: improve DPI awareness & add docs #1102

@emidoots

Description

@emidoots

Today mach-core provides:

  1. Framebuffer size in pixels (arbitrary units)
  2. Window size in pixels (arbitrary units)
  3. A guarantee that framebuffer size is always >= window size.
  • Example A: on a non-retina/HDPI display, the framebuffer size and window size may be the same.
  • Example B: on a retina/HDPI display, the framebuffer size may be twice the window size.

The following issues exist:

  • https://machengine.org/core should have documentation about how mach-core handles resolutions, DPI and Retina displays, etc.
  • on MacOS, today we always choose to have the framebuffer size match the actual native resolution (e.g. 2x the window size), see [0] [1], this should be made configurable.
  • on Windows, we currently do not have a way to opt-in to e.g. "Per-Monitor (V2) DPI Awareness"
  • on Linux, it is unclear how mach-core/GLFW behaves currently when using e.g. fractional scaling in gnome or similar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions