sdlGetRenderTarget function

Pointer<SdlTexture> sdlGetRenderTarget(
  1. Pointer<SdlRenderer> renderer
)

Get the current render target.

The default render target is the window for which the renderer was created, and is reported a NULL here.

\param renderer the rendering context \returns the current render target or NULL for the default render target.

\since This function is available since SDL 2.0.0.

\sa SDL_SetRenderTarget

extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer)

Implementation

Pointer<SdlTexture> sdlGetRenderTarget(Pointer<SdlRenderer> renderer) {
  final sdlGetRenderTargetLookupFunction = libSdl2.lookupFunction<
      Pointer<SdlTexture> Function(Pointer<SdlRenderer> renderer),
      Pointer<SdlTexture> Function(
          Pointer<SdlRenderer> renderer)>('SDL_GetRenderTarget');
  return sdlGetRenderTargetLookupFunction(renderer);
}