veldrid / veldrid

A low-level, portable graphics library for .NET.
https://veldrid.dev/
MIT License
2.43k stars 266 forks source link

Hi-DPI support #238

Open tzachshabtay opened 4 years ago

tzachshabtay commented 4 years ago

Hi, I wanted to check in on the hi dpi support branch: https://github.com/mellinoe/veldrid/tree/hi-dpi

It looks like it hasn't been merged in yet, what are the plans for this?

Thanks.

tzachshabtay commented 4 years ago

Hi @mellinoe, any update on this? This is the only blocker for me to officially adopt your library in my project. Thanks

AartOdding commented 3 years ago

I am also very much interested in having high dpi support. I am for now using the hi-dpi branch however there are still some issues regarding switching monitors. Are there any plans to solve the last issues and support hi-dpi in master?

Maia-Everett commented 2 months ago

Yes, please.

SDL supports HiDPI, but there's currently no way to pass SDL_WindowFlags.AllowHighDpi to a Veldrid managed SDL window, and even if you do, it breaks mouse input. This results in window contents being blurry under Wayland, because SDL draws at 1x scale and stretches the bitmap.

See https://github.com/goatcorp/XIVLauncher.Core/pull/152

smoogipoo commented 2 months ago

If you're able to, I suggest BYO version of SDL2, because the one in this repo is out of date not going to be maintained.

Until recently, we've maintained our SDL2 C# package here: https://www.nuget.org/packages/ppy.SDL2-CS/1.0.741-alpha We're unlikely to keep actively maintaining it going forward since we've now moved to SDL3 (which you can use with Veldrid too but bear in mind it is pre-release at this stage), but SDL2 itself is not really receiving many important changes anymore.