SDL_SetGPURenderState - Man Page
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
- renderer
 the renderer to use.
- state
 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.
Referenced By
SDL_CreateGPURenderer(3), SDL_CreateGPURenderState(3), SDL_GPURenderState.3type(3).
SDL 3.3.2 Simple Directmedia Layer SDL3 FUNCTIONS