SDL Wiki

SDL_SetRenderGPUState

Set custom GPU render state.

Header File

Defined in <SDL3/SDL_render.h>

Syntax

bool SDL_SetRenderGPUState(SDL_Renderer *renderer, SDL_GPURenderState *state);

Function Parameters

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

Return Value

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

Remarks

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

Thread Safety

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

Version

This function is available since SDL 3.4.0.


CategoryAPI, CategoryAPIFunction, CategoryRender


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.