sdlRenderClipEnabled function

bool sdlRenderClipEnabled(
  1. Pointer<SdlRenderer> renderer
)

Get whether clipping is enabled on the given renderer.

\param renderer the rendering context. \returns true if clipping is enabled or false if not; 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_GetRenderClipRect \sa SDL_SetRenderClipRect

extern SDL_DECLSPEC bool SDLCALL SDL_RenderClipEnabled(SDL_Renderer *renderer)

Implementation

bool sdlRenderClipEnabled(Pointer<SdlRenderer> renderer) {
  final sdlRenderClipEnabledLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlRenderer> renderer),
      int Function(Pointer<SdlRenderer> renderer)>('SDL_RenderClipEnabled');
  return sdlRenderClipEnabledLookupFunction(renderer) == 1;
}