sdlGetTextureBlendMode function render

bool sdlGetTextureBlendMode(
  1. Pointer<SdlTexture> texture,
  2. Pointer<Uint32> blendMode
)

Get the blend mode used for texture copy operations.

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

extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode *blendMode)

Implementation

bool sdlGetTextureBlendMode(
  Pointer<SdlTexture> texture,
  Pointer<Uint32> blendMode,
) {
  final sdlGetTextureBlendModeLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlTexture> texture, Pointer<Uint32> blendMode),
        int Function(Pointer<SdlTexture> texture, Pointer<Uint32> blendMode)
      >('SDL_GetTextureBlendMode');
  return sdlGetTextureBlendModeLookupFunction(texture, blendMode) == 1;
}