Opened 10 years ago
Last modified 15 months ago
#2349 new enhancement
[PATCH] Add support for Hi-DPI displays
Reported by: | julian37 | Owned by: | wraitii |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Work In Progress |
Component: | Core engine | Keywords: | patch, review |
Cc: | Ilya Ryzhenkov, hal9000 | Patch: | Phab:D1925 |
Description (last modified by )
It would be nice if 0 A.D. could take advantage of Hi-DPI displays, such as Apple's Retina displays.
As far as I can tell, this requires the following:
Upgrading to SDL2, which adds theSDL_WINDOW_ALLOW_HIGHDPI
flagEnsuring the GUI remains at the original size (i.e. magnifying it by 2x with respect to 3D graphics)
And the following are nice-to-haves:
- Doubling the resolution of the prerendered fonts for crisp text rendering
- Providing all bitmap graphics in double the resolution (seeing that 4K displays are on the horizon, perhaps new bitmaps graphics should be prepared at 4x the resolution)
I've attached a simple-minded patch for the first issue (SDL2 support) to ticket #2041, and I've prepared a patch to address issues 2 and 3 (scaled-up GUI and high-res fonts), will attach it shortly.
Attachments (3)
Change History (22)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
comment:4 by , 9 years ago
Description: | modified (diff) |
---|
comment:6 by , 8 years ago
Keywords: | patch review added |
---|---|
Milestone: | Backlog → Alpha 20 |
Summary: | Add support for Hi-DPI displays → [PATCH] Add support for Hi-DPI displays |
comment:7 by , 8 years ago
Milestone: | Alpha 20 → Alpha 21 |
---|
comment:8 by , 8 years ago
Keywords: | rfc added; review removed |
---|
Move tickets from the review queue to the rfc one.
comment:9 by , 8 years ago
I am using a HiDPI screen almost 4K and 13': It not very good to play with it. Here a screenshot with current SVN version a21: http://pix.toile-libre.org/upload/original/1473526126.png
comment:12 by , 7 years ago
Keywords: | review added; rfc removed |
---|
Attached patch is rebased, fixed, and I added a config flag to enable/disable it. The problem is that high DPI is excruciatingly slow on my system, and I suspect it would be similar or many other people.
It would be great if the renderer could have a resolution independent from the screen/GUI resolution, i.e. render the GUI at retina resolution and then renderer at non-retina, but that would require us to decouple the renderer resolution and it's not that easy and probably requires using frame buffers all the time and I don't believe we want to support that now.
by , 7 years ago
Attachment: | highdpi2.patch added |
---|
comment:14 by , 7 years ago
Description: | modified (diff) |
---|
Use c++ casts as c casts are not tested on compile time.
comment:15 by , 5 years ago
Cc: | added |
---|
comment:17 by , 4 years ago
Patch: | → Phab:D1925 |
---|
comment:18 by , 3 years ago
Owner: | set to |
---|
SDL2 support has been merged into SVN. It's not yet the default for OS X, but will be for A17 and this task can be worked on.