Scroll to navigation

SDL_SetGPURenderState(3) SDL3 FUNCTIONS SDL_SetGPURenderState(3)

NAME

SDL_SetGPURenderState - Set custom GPU render state.

SYNOPSIS

#include <SDL3/SDL_render.h>
bool SDL_SetGPURenderState(SDL_Renderer *renderer, SDL_GPURenderState *state);

DESCRIPTION

This function sets custom GPU render state for subsequent draw calls. This allows using custom shaders with the GPU renderer.

FUNCTION PARAMETERS

the renderer to use.
the state to to use, or NULL to clear custom GPU render state.

RETURN VALUE

Returns true on success or false on failure; call SDL_GetError() for more information.

THREAD SAFETY

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

AVAILABILITY

This function is available since SDL 3.4.0.

SDL 3.3.3 Simple Directmedia Layer