sdlSetSoftwareRendererSurface function render

bool sdlSetSoftwareRendererSurface(
  1. Pointer<SdlRenderer> renderer,
  2. Pointer<SdlSurface> surface
)

Associate a software renderer with a surface.

\param renderer the rendering context. \param surface the surface where rendering is done. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function should be called on the thread that created the renderer.

\since This function is available since SDL 3.6.0.

\sa SDL_CreateSoftwareRenderer

extern SDL_DECLSPEC bool SDLCALL SDL_SetSoftwareRendererSurface(SDL_Renderer *renderer, SDL_Surface *surface)

See also:

Implementation

bool sdlSetSoftwareRendererSurface(
  Pointer<SdlRenderer> renderer,
  Pointer<SdlSurface> surface,
) {
  final sdlSetSoftwareRendererSurfaceLookupFunction = _libSdl
      .lookupFunction<
        Bool Function(
          Pointer<SdlRenderer> renderer,
          Pointer<SdlSurface> surface,
        ),
        bool Function(
          Pointer<SdlRenderer> renderer,
          Pointer<SdlSurface> surface,
        )
      >('SDL_SetSoftwareRendererSurface');
  return sdlSetSoftwareRendererSurfaceLookupFunction(renderer, surface);
}