The rendering context.
An SDL_Rect structure representing the area in pixels relative to the to current viewport, or null for the entire viewport.
A new SDL_Surface on success or null on failure; call SDL_GetError for more information.
Threadsafety: This function should only be called on the main thread.
Page generated by adrdox
Read pixels from the current rendering target.
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.