You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
This code still doesn't quite work yet. :) --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404174
This commit is contained in:
parent
ea4fb3a1a4
commit
0f620b7fe4
7 changed files with 82 additions and 50 deletions
|
@ -1173,8 +1173,9 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_TextureID textureID,
|
|||
*
|
||||
* \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 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_TextureID textureID,
|
|||
* \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 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect,
|
|||
*
|
||||
* \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 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect,
|
|||
* \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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue