Conversation
pzychotic
left a comment
There was a problem hiding this comment.
Good job, really like the removed submodules :)
|
Two things I noticed testing on Win 11:
|
Definitely related to gamma correction. The SDL functions related to gamma correction did not work great on Linux in my experience, and they were applied to the entire screen, which is less than ideal. This is part of the reason why they were eventually deleted. In my opinion in-game brightness selection should be implemented at the shader level if we want it, or we can let the user configure their monitor settings themselves using the grey box displayed in the brightness settings, and remove the slider (long gone are the CRT days...). I'm unsure currently how to handle this properly.
I did not notice that because I run my monitor at 100% scaling, but it should be fixed now. We're using |
|
Gamma correction is now applied by shaders. This is also better solution than using the native SDL function because it is now applied only to the game window and not the whole screen. The setting is now enabled on Unix platforms, and the "apply" button really works. I'm quite satisfied by this new solution. Can you please test again @pzychotic ? :) |
SDL_SetWindowGammaRamp was removed in SDL3 due to poor support in modern OS
Introduce the USE_EXTERNAL_SDL option allowing the use of an external installation of SDL3, for example from the system's package manager. Also fix double find_package for plog
Before, when using VCPKG for 3rd parties, the plog/SDL used were the ones we bundle and not the ones built by VCPKG as we intended
Simplify third-party dependency management: either use the installation provided by VCPKG, or the system one. This avoid having too many different sources for a single 3rd party
Using high-DPI support with a scale factor would not scale the game window. We now take the scaling factor into account, so that the Descent3 game window is bigger if the user chooses a bigger scale factor. Also use the SDL_WINDOWPOS_UNDEFINED_DISPAY with display id, fixing the '-display' argument. Read more here: https://wiki.libsdl.org/SDL3/README/highdpi
Gamma Correction function hhas been removed in SDL3, so do it in shader code instead. This is a better solution because it allows to perform this correction only on the game window, which was not the case for the SDL function.
|
Pull Request Type
Description
Now that SDL3 has a stable release, it's about time we upgrade our main dependency ! This will unlock new features that we could use, such as the GPU API or the Dialog API.
This upgrade was performed using the migration guide and Python renaming script for functions and macros that changed name.
Due to an issue in upstream dbus (which is now required for SDL3) when cross-compiling, I had to create an overlay port inspired by vcpkg#40038.
I also tried to make third-party management more manageable so that developers only have 2 options to get non-vendored dependencies: either use vcpkg or install dependencies themselves so that
find_packagefinds them automatically. There used to be a 3rd option for plog that could use the code from a submodule. For consistency, it was removed as well as theUSE_EXTERNAL_PLOGcmake option.Gamma correction was also removed because SDL3 does not support it.