sdlGetTextureAlphaModFloat function

bool sdlGetTextureAlphaModFloat(
  1. Pointer<SdlTexture> texture,
  2. Pointer<Float> 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.1.3.

\sa SDL_GetTextureAlphaMod \sa SDL_GetTextureColorModFloat \sa SDL_SetTextureAlphaModFloat

extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureAlphaModFloat(SDL_Texture *texture, float *alpha)

Implementation

bool sdlGetTextureAlphaModFloat(
    Pointer<SdlTexture> texture, Pointer<Float> alpha) {
  final sdlGetTextureAlphaModFloatLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlTexture> texture, Pointer<Float> alpha),
      int Function(Pointer<SdlTexture> texture,
          Pointer<Float> alpha)>('SDL_GetTextureAlphaModFloat');
  return sdlGetTextureAlphaModFloatLookupFunction(texture, alpha) == 1;
}