Skip to main content

SDL_SetTextureAlphaModFloat

Function SDL_SetTextureAlphaModFloat 

Source
pub unsafe extern "C" fn SDL_SetTextureAlphaModFloat(
    texture: *mut SDL_Texture,
    alpha: f32,
) -> bool
Expand description

Set an additional alpha value multiplied into render copy operations.

When this texture is rendered, during the copy operation the source alpha value is modulated by this alpha value according to the following formula:

srcA = srcA * alpha

Alpha modulation is not always supported by the renderer; it will return false if alpha modulation is not supported.

Parameter: texture the texture to update. Parameter: alpha the source alpha value multiplied into copy operations. Returns: true on success or false on failure; call SDL_GetError() for more information.

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

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_GetTextureAlphaModFloat See Also: SDL_SetTextureAlphaMod See Also: SDL_SetTextureColorModFloat