On 7/31/2019 at 2:13 AM, Sword7 said:
I learned that Nvidia/AMD blocked 10-bit color access from OpenGL programming for windowed mode but only support DirectX for 10-bit color depth in both windowd and full screen
10bit color support was officially added way back in D3D9 as a way to display "wide color gamut"... but it was all fairly poorly defined and not well specified (just like GL ?). e.g. does the buffer contain Rec.709 RGB primaries or Rec.2020 RGB primaries? Does it use sRGB transfer functions, Rec.709, PQ??? (Well, PQ and 2020 weren't invented yet, so this is obviously rhetorical now...)
I wouldn't be surprised if most drivers just silently convert it down to 8-bit behind the scenes...
With D3D on Windows 10, you can finally make a 10bit back-buffer reliably and use new DXGI API's to attach precise metadata about how it's encoded (e.g. HDR10 PQ Rec.2020 RGB). You can also make a 16-bit back-buffer and output linear scRGB data, which is a lot easier, and let the driver do the conversion to HDR10
With D3D, you can also use the extensions from each vendor (NVAPI and AMD AGS) to achieve the same as the above, without using the new DXGI API's.
Seeing that DXGI isn't too applicable to GL, I would guess that you'd be stuck looking for vendor-specific extensions from AMD/NV/etc on how to display HDR10 data...
Alternatively, you could use one of the "D3D interop" extensions, where you do all of your rendering in GL, but then share the final image with a D3D device and have it display it to the screen...
That said... As for windowed vs full-screen... On windows, unless you're on Windows 10 and the user has opted in to display their desktop in HDR10 (unlikely), then you really have to use a full-screen mode to display your game in HDR10. Windowed modes might "work" but definitely won't be delivering a real HDR signal to the monitor...