Use SDL_Color for SDL_RenderGeometryRaw() and add SDL_RenderGeometryRawFloat()

Eventually we can re-add a fast path for that data down to the individual renderers. Setting color scale would still require converting to float, and most hardware accelerated renderers prefer to consume colors as float, so this requires some thought and performance testing.

Fixes https://github.com/libsdl-org/SDL/issues/9009
This commit is contained in:
Sam Lantinga
2024-02-06 17:23:07 -08:00
parent 9e194c1a1d
commit 3158342441
7 changed files with 77 additions and 6 deletions

View File

@@ -1051,7 +1051,7 @@ SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() have been renamed SD
The viewport, clipping state, and scale for render targets are now persistent and will remain set whenever they are active.
SDL_RenderGeometryRaw() and SDL_Vertex have been changed to use floating point colors, in the range of [0..1] for SDR content.
SDL_Vertex has been changed to use floating point colors, in the range of [0..1] for SDR content.
SDL_RenderReadPixels() returns a surface instead of filling in preallocated memory.