mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-04 02:47:39 +00:00
Finalized the SDL render API colorspaces
The renderer will always use the sRGB colorspace for drawing, and will default to the sRGB output colorspace. If you want blending in linear space and HDR support, you can select the scRGB output colorspace, which is supported by the direct3d11 and direct3d12
This commit is contained in:
parent
7c089f4e57
commit
9591b2cfb4
12 changed files with 195 additions and 248 deletions
|
@ -250,9 +250,7 @@ struct SDL_Renderer
|
|||
SDL_Texture *target;
|
||||
SDL_Mutex *target_mutex;
|
||||
|
||||
SDL_Colorspace input_colorspace;
|
||||
SDL_Colorspace output_colorspace;
|
||||
SDL_bool colorspace_conversion;
|
||||
|
||||
SDL_FColor color; /**< Color for drawing operations values */
|
||||
SDL_BlendMode blendMode; /**< The drawing blend mode */
|
||||
|
@ -303,8 +301,9 @@ extern SDL_RenderDriver VITA_GXM_RenderDriver;
|
|||
extern void SDL_SetupRendererColorspace(SDL_Renderer *renderer, SDL_PropertiesID props);
|
||||
|
||||
/* Colorspace conversion functions */
|
||||
extern void SDL_ConvertToLinear(SDL_Renderer *renderer, SDL_FColor *color);
|
||||
extern void SDL_ConvertFromLinear(SDL_Renderer *renderer, SDL_FColor *color);
|
||||
extern SDL_bool SDL_RenderingLinearSpace(SDL_Renderer *renderer);
|
||||
extern void SDL_ConvertToLinear(SDL_FColor *color);
|
||||
extern void SDL_ConvertFromLinear(SDL_FColor *color);
|
||||
|
||||
/* Blend mode functions */
|
||||
extern SDL_BlendFactor SDL_GetBlendModeSrcColorFactor(SDL_BlendMode blendMode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue