logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_CreateSoftwareRenderer - Create a 2D software rendering context for a surface.

Availability

       This function is available since SDL 3.2.0.

Description

       Two other API which can be used to create SDL_Renderer :

       SDL_CreateRenderer () and

       SDL_CreateWindowAndRenderer  (). These can _also_ create a software renderer, but they are intended to be
       used with an

       SDL_Window
        as the final destination and not an

       SDL_Surface .

Function Parameters

surface
              the SDL_Surface
               structure representing the surface where rendering is done.

Header File

       Defined in SDL3/SDL_render.h

Name

       SDL_CreateSoftwareRenderer - Create a 2D software rendering context for a surface.

Return Value

       ( SDL_Renderer
        *) Returns a valid rendering context or NULL if there was  an  error;  call  SDL_GetError  ()  for  more
       information.

See Also

(3), SDL_DestroyRenderer(3)

Simple Directmedia Layer                           SDL 3.2.10                      SDL_CreateSoftwareRenderer(3)

Synopsis

#include"SDL3/SDL.h"SDL_Renderer*SDL_CreateSoftwareRenderer(SDL_Surface*surface);

Thread Safety

       This function should only be called on the main thread.

See Also