mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-09 04:48:14 +00:00
render: Replaced SDL_RenderFlush with SDL_FlushRenderer.
This uses the same `SDL_VerbNoun` format as the rest of SDL3, and also adds stronger effort to invalidate cached state in the backend, so cooperation improves with apps that are using lowlevel rendering APIs directly. Fixes #367.
This commit is contained in:
@@ -265,9 +265,13 @@ static int FlushRenderCommandsIfTextureNeeded(SDL_Texture *texture)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SDL_RenderFlush(SDL_Renderer *renderer)
|
||||
int SDL_FlushRenderer(SDL_Renderer *renderer)
|
||||
{
|
||||
return FlushRenderCommands(renderer);
|
||||
if (FlushRenderCommands(renderer) == -1) {
|
||||
return -1;
|
||||
}
|
||||
renderer->InvalidateCachedState(renderer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset)
|
||||
|
Reference in New Issue
Block a user