Each texture gets its own palette, the palette is updated when it is rendered if necessary, rendering is flushed if a texture render is already queued up.
Trying to share palettes and handle the different cases of queued rendering and changing palettes in the middle of the frame ends up being very complicated, so we'll keep it simple for now.
SDL supports the following use cases:
* Normal operation with fast parameter checks (default):
SDL_SetHint(SDL_HINT_INVALID_PARAM_CHECKS, "1");
* Object parameters are checked for use-after-free issues:
SDL_SetHint(SDL_HINT_INVALID_PARAM_CHECKS, "2");
* Enable full validation, plus assert on invalid parameters:
#define SDL_ASSERT_INVALID_PARAMS
* Disable all parameter validation:
#define SDL_DISABLE_INVALID_PARAMS
The software renderer now matches the 3D renderer behavior by rendering a reversed rectangle (extending width or height in the opposite direction) when width or height is negative. It also now renders no rectangle if the width and height are 0.
Fixes https://github.com/libsdl-org/SDL/issues/13400
When attaching a renderer (GL based specifically) to a window that was not created with the appropriate flags, the window would be destroyed and recreated to configure it for the desired rendering backend. While most of the issues with this have been mitigated over time, there can still be some undesirable side effects from doing so on certain platforms.
If the window was just created and was never configured for any graphics context, it is possible that the reconfiguration can be done without destroying the window first.
The Wayland implementation fixes an issue when creating a window with the fullscreen flag on wlroots based Wayland compositors, and can likely be extended to other platforms to avoid unnecessarily destroying/recreating a window in the very common case where a window is created, followed immediately by attaching a renderer.
This still logs backend choices, but we might use it for other things. For
example, what Android device is being used, or all the devices we enumerated,
etc.
Ideally this eventually logs all the stuff we often have to ask followup
questions about.
- Re-enable FPS counter, which is hidden by default anyway - but essential while working on an actual project.
- Fix link in the platform's README.
- Re-order list of supported platforms (alphabetical order to maintain consistency).