sdlGetRenderViewport function render
Get the drawing area for the current target.
Each render target has its own viewport. This function gets the viewport for the current render target.
\param renderer the rendering context. \param rect an SDL_Rect structure filled in with the current drawing area. \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_RenderViewportSet \sa SDL_SetRenderViewport
extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderViewport(SDL_Renderer *renderer, SDL_Rect *rect)
Implementation
bool sdlGetRenderViewport(
Pointer<SdlRenderer> renderer,
Pointer<SdlRect> rect,
) {
final sdlGetRenderViewportLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect),
int Function(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect)
>('SDL_GetRenderViewport');
return sdlGetRenderViewportLookupFunction(renderer, rect) == 1;
}