SDL_SetTextureColorMod

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 / 255)

Color modulation is not always supported by the renderer; it will return false if color modulation is not supported.

extern (C) nothrow @nogc extern
bool
SDL_SetTextureColorMod

Parameters

texture SDL_Texture*

The texture to update.

r Uint8

The red color value multiplied into copy operations.

g Uint8

The green color value multiplied into copy operations.

b Uint8

The blue color value multiplied into copy operations.

Return Value

Type: bool

true on success or false on failure; call SDL_GetError for more information.

Threadsafety: This function should only be called on the main thread.

See Also

Meta