sapp: add HDR support and runtime pixel format switching API#1449
Draft
squk wants to merge 1 commit into
Draft
Conversation
Owner
|
Thanks for the PR, but I'd like to tackle that myself in an update which generally adds more config options for the swapchain and does a general cleanup round for 'display parameters' in sapp_desc (like getting rid of some things that didn't work out - like I'll keep the PR open, but won't merge it (I'll most like use it for 'inspiration' though). I haven't thought much yet about being able to reconfigure the swapchain after initialization, but that's definitely needed for games that want to avoid the "restart the game for setting changes to take effect", so I'm very much in favour - but I would keep these things in separate updates. |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At first I implemented basic HDR support through a bool flag on sapp_desc in REMINDER_TO_INSERT_PR_LINK. Then I saw your comment in #1370 stating sRGB support should be implemented first so I decided to just have the API use that type and handle the Metal HDR flag in the platform specific impl.
In addition to the field on sapp_desc, I decided to add an API for switching the swapchain format at runtime, since most games/applications provide this option without needing to restart the application to see its effects(which also allows the user to confirm its working on their hardware configuration before persisting to the apps on-disk settings, potentially breaking the app at next start).
Draft since it's only working on Mac currently.