sdlSetTextureColorModFloat function
Set an additional color value multiplied into render copy operations.
When this texture is rendered, during the copy operation each source color channel is modulated by the appropriate color value according to the following formula:
srcC = srcC * color
Color modulation is not always supported by the renderer; it will return false if color modulation is not supported.
\param texture the texture to update. \param r the red color value multiplied into copy operations. \param g the green color value multiplied into copy operations. \param b the blue color value multiplied into copy operations. \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_GetTextureColorModFloat \sa SDL_SetTextureAlphaModFloat \sa SDL_SetTextureColorMod
extern SDL_DECLSPEC bool SDLCALL SDL_SetTextureColorModFloat(SDL_Texture *texture, float r, float g, float b)
Implementation
bool sdlSetTextureColorModFloat(
Pointer<SdlTexture> texture, double r, double g, double b) {
final sdlSetTextureColorModFloatLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlTexture> texture, Float r, Float g, Float b),
int Function(Pointer<SdlTexture> texture, double r, double g,
double b)>('SDL_SetTextureColorModFloat');
return sdlSetTextureColorModFloatLookupFunction(texture, r, g, b) == 1;
}