gboisse / gfx

A minimalist and easy to use graphics API.
MIT License
498 stars 35 forks source link

Add High bit depth detection and support #142

Closed maoliver-amd closed 1 month ago

maoliver-amd commented 1 month ago

Adds code to detect the current bit depth support for the connected display and sets the swapchain format accordingly. Currently it just detects 8b or 10b SDR support and automatically uses 10b if supported. This happens seamlessly and doesnt require any user changes to their app as d3d will automatically handle conversion when presenting buffers (standard float [0-1) to uint conversion). Also added some code lines (currently commented out) that show how to detect HDR capable displays which can be used for any future HDR support updates.