pkdawson / imgui-godot

Dear ImGui plugin for Godot 4
MIT License
494 stars 28 forks source link

DPI scaling #7

Closed pkdawson closed 2 years ago

pkdawson commented 2 years ago

Figure out which Godot scaling option(s) we can support.

https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html

https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-how-should-i-handle-dpi-in-my-application

We need to save the full font configuration so it can be changed and reloaded if the scale changes. AddFont should just build a configuration, RebuildFontAtlas should actually load everything.

Stretch mode disabled is simple enough. We should optionally auto-detect "retina" displays, and have configurable scaling on top of that.

canvas_items may require a SubViewport to override the scaling and do our own custom scaling? https://github.com/godotengine/godot-demo-projects/tree/4.0-dev/viewport/3d_scaling