SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Support for native HDR / WCG displays

Open SheridanR opened this issue 2 years ago • 1 comments
trafficstars

SDL currently does not support the creation of native-HDR or wide-color gamut (WCG) windows, nor changing the display mode to such an HDR/WCG mode.

Apparently someone created a patch to do this in GLFW: https://github.com/glfw/glfw/issues/1907

Any chance we can see this also supported in SDL?

SheridanR avatar May 15 '23 06:05 SheridanR

Yes, this seems like a good idea. Do you want to create a tested PR?

slouken avatar May 15 '23 22:05 slouken

+1 for this being a desirable feature.

In particular I am getting reports from users that on Win11 that have MS's "Auto HDR" feature on, which then applies to my SDL2/OpenGL game, but apparently my game then "turns HDR off" on exit somehow, which seems to be a thing other people are experiencing too: https://www.reddit.com/r/opengl/comments/ifsdz3/when_my_opengl_game_runs_it_disables_hdr_how_can/

As such, not an SDL problem, more of bad Win11 OpenGL interaction it seems.

Anyway, that could also be solved by my game actually just turning HDR on.. our pipeline already uses float colors and buffers thruout.

aardappel avatar Sep 03 '23 18:09 aardappel

I'd like to add this for SDL 3.0.

slouken avatar Nov 08 '23 04:11 slouken

bump, this would be nice and it would allow down-stream libraries like löve to fully support HDR screens, which are only getting more and more common in gaming hardware nowadays.

Clemapfel avatar Dec 01 '23 21:12 Clemapfel

HDR support is in for SDL 3.0, see testcolorspace for details.

slouken avatar May 21 '24 18:05 slouken