Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

SDL_SetSurfaceColorspace - Set the colorspace used by a surface.

Availability

       This function is available since SDL 3.2.0.

Description

       Setting the colorspace doesn't change the pixels, only how they are interpreted in color operations.

Function Parameters

surface
              the SDL_Surface structure to update.

       colorspace
              an SDL_Colorspace value describing the surface colorspace.

Name

       SDL_SetSurfaceColorspace - Set the colorspace used by a surface.

Return Value

       for more information.

See Also

SDL_GetSurfaceColorspace(3)

Simple Directmedia Layer                           SDL 3.2.20                        SDL_SetSurfaceColorspace(3)

Synopsis

#include<SDL3/SDL_surface.h>boolSDL_SetSurfaceColorspace(SDL_Surface*surface,SDL_Colorspacecolorspace);

Thread Safety

       This function is not thread safe.

See Also