diff include/SDL_video.h @ 3435:9f62f47d989b

You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels() This code still doesn't quite work yet. :)
author Sam Lantinga <slouken@libsdl.org>
date Mon, 16 Nov 2009 07:13:07 +0000
parents d3baf5ac4e37
children 7a606cfa5c2d
line wrap: on
line diff
--- a/include/SDL_video.h	Sun Nov 15 09:21:46 2009 +0000
+++ b/include/SDL_video.h	Mon Nov 16 07:13:07 2009 +0000
@@ -1173,8 +1173,9 @@
  *  
  *  \param rect   A pointer to the rectangle to read, or NULL for the entire 
  *                render target.
- *  \param pixels A pointer to be filled in with the pixel data in the rendering
- *                target format.
+ *  \param format The desired format of the pixel data, or 0 to use the format
+ *                of the rendering target
+ *  \param pixels A pointer to be filled in with the pixel data
  *  \param pitch  The pitch of the pixels parameter.
  *  
  *  \return 0 on success, or -1 if pixel reading is not supported.
@@ -1182,6 +1183,7 @@
  *  \warning This is a very slow operation, and should not be used frequently.
  */
 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect,
+                                                 Uint32 format,
                                                  void *pixels, int pitch);
 
 /**
@@ -1189,6 +1191,8 @@
  *  
  *  \param rect   A pointer to the rectangle to write, or NULL for the entire 
  *                render target.
+ *  \param format The format of the pixel data, or 0 to use the format
+ *                of the rendering target
  *  \param pixels A pointer to the pixel data to write.
  *  \param pitch  The pitch of the pixels parameter.
  *  
@@ -1197,6 +1201,7 @@
  *  \warning This is a very slow operation, and should not be used frequently.
  */
 extern DECLSPEC int SDLCALL SDL_RenderWritePixels(const SDL_Rect * rect,
+                                                  Uint32 format,
                                                   const void *pixels,
                                                   int pitch);