sdlSetRenderColorScale function
Set the color scale used for render operations.
The color scale is an additional scale multiplied into the pixel color value while rendering. This can be used to adjust the brightness of colors during HDR rendering, or changing HDR video brightness when playing on an SDR display.
The color scale does not affect the alpha channel, only the color brightness.
\param renderer the rendering context. \param scale the color scale value. \returns true on success or false on failure; call SDL_GetError() for more information.
\threadsafety This function should only be called on the main thread.
\since This function is available since SDL 3.1.3.
\sa SDL_GetRenderColorScale
extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderColorScale(SDL_Renderer *renderer, float scale)
Implementation
bool sdlSetRenderColorScale(Pointer<SdlRenderer> renderer, double scale) {
final sdlSetRenderColorScaleLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlRenderer> renderer, Float scale),
int Function(Pointer<SdlRenderer> renderer,
double scale)>('SDL_SetRenderColorScale');
return sdlSetRenderColorScaleLookupFunction(renderer, scale) == 1;
}