table of contents
- testing 3.2.10+ds-1
- unstable 3.2.10+ds-1
- experimental 3.2.16+ds-1
SDL_RenderReadPixels(3) | SDL3 FUNCTIONS | SDL_RenderReadPixels(3) |
NAME¶
SDL_RenderReadPixels - Read pixels from the current rendering target.
HEADER FILE¶
Defined in SDL3/SDL_render.h
SYNOPSIS¶
#include "SDL3/SDL.h"
SDL_Surface * SDL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect);
DESCRIPTION¶
The returned surface should be freed with
SDL_DestroySurface () WARNING : This is a very slow operation, and should not be used frequently. If you're using this on the main rendering target, it should be called after rendering and before SDL_RenderPresent ().
FUNCTION PARAMETERS¶
RETURN VALUE¶
( SDL_Surface
*) Returns a new SDL_Surface
on success or NULL on failure; call SDL_GetError () for more
information.
THREAD SAFETY¶
This function should only be called on the main thread.
AVAILABILITY¶
This function is available since SDL 3.2.0.
SDL 3.2.0 | Simple Directmedia Layer |