Wiki Page Content

Revision 1 as of 2009-12-14 06:40:21

Clear message

SDL_RenderReadPixels

Use this function to read pixels from the current rendering target.

Syntax

int SDL_RenderReadPixels(const SDL_Rect* rect,
                         Uint32          format,
                         void*           pixels,
                         int             pitch)

Function Parameters

rect

a pointer to the SDL_Rect to read, or NULL for the entire render target

format

the desired format of the pixel data, or 0 to use the format of the rendering target

pixels

a pointer to be filled in with the pixel data

pitch

the pitch of the pixels parameter

Return Value

Returns 0 on success or -1 if pixel reading is not supported; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

WARNING: This is a very slow operation, and should not be used frequently.


CategoryAPI, CategoryVideo

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit