mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-04 04:54:42 +00:00
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:
@@ -457,7 +457,7 @@ static void DrawGradient(float x, float y, float width, float height, float star
|
||||
color[2] = max_color;
|
||||
color[3] = min_color;
|
||||
|
||||
SDL_RenderGeometryRaw(renderer, NULL, xy, xy_stride, color, color_stride, NULL, 0, num_vertices, indices, num_indices, size_indices);
|
||||
SDL_RenderGeometryRawFloat(renderer, NULL, xy, xy_stride, color, color_stride, NULL, 0, num_vertices, indices, num_indices, size_indices);
|
||||
}
|
||||
|
||||
static float scRGBtoNits(float v)
|
||||
|
||||
Reference in New Issue
Block a user