sdlGetTextureAlphaMod function render

bool sdlGetTextureAlphaMod(
  1. Pointer<SdlTexture> texture,
  2. Pointer<Uint8> alpha
)

Get the additional alpha value multiplied into render copy operations.

\param texture the texture to query. \param alpha a pointer filled in with the current alpha 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.2.0.

\sa SDL_GetTextureAlphaModFloat \sa SDL_GetTextureColorMod \sa SDL_SetTextureAlphaMod

extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureAlphaMod(SDL_Texture *texture, Uint8 *alpha)

Implementation

bool sdlGetTextureAlphaMod(Pointer<SdlTexture> texture, Pointer<Uint8> alpha) {
  final sdlGetTextureAlphaModLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlTexture> texture, Pointer<Uint8> alpha),
        int Function(Pointer<SdlTexture> texture, Pointer<Uint8> alpha)
      >('SDL_GetTextureAlphaMod');
  return sdlGetTextureAlphaModLookupFunction(texture, alpha) == 1;
}