946 /** |
946 /** |
947 * \fn int SDL_QueryTexturePixels(SDL_TextureID textureID, void **pixels, int pitch) |
947 * \fn int SDL_QueryTexturePixels(SDL_TextureID textureID, void **pixels, int pitch) |
948 * |
948 * |
949 * \brief Query the pixels of a texture, if the texture does not need to be locked for pixel access. |
949 * \brief Query the pixels of a texture, if the texture does not need to be locked for pixel access. |
950 * |
950 * |
951 * \param texture A texture to be queried, which was created with SDL_TextureAccess_Local |
951 * \param texture A texture to be queried, which was created with SDL_TEXTUREACCESS_LOCAL |
952 * \param pixels A pointer filled with a pointer to the pixels for the texture |
952 * \param pixels A pointer filled with a pointer to the pixels for the texture |
953 * \param pitch A pointer filled in with the pitch of the pixel data |
953 * \param pitch A pointer filled in with the pitch of the pixel data |
954 * |
954 * |
955 * \return 0 on success, or -1 if the texture is not valid, or must be locked for pixel access. |
955 * \return 0 on success, or -1 if the texture is not valid, or must be locked for pixel access. |
956 */ |
956 */ |
1001 * \param pixels The raw pixel data |
1001 * \param pixels The raw pixel data |
1002 * \param pitch The number of bytes between rows of pixel data |
1002 * \param pitch The number of bytes between rows of pixel data |
1003 * |
1003 * |
1004 * \return 0 on success, or -1 if the texture is not valid |
1004 * \return 0 on success, or -1 if the texture is not valid |
1005 * |
1005 * |
1006 * \note This is a very slow function for textures not created with SDL_TextureAccess_Local. |
1006 * \note This is a very slow function for textures not created with SDL_TEXTUREACCESS_LOCAL. |
1007 */ |
1007 */ |
1008 extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_TextureID textureID, |
1008 extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_TextureID textureID, |
1009 const SDL_Rect * rect, |
1009 const SDL_Rect * rect, |
1010 const void *pixels, int pitch); |
1010 const void *pixels, int pitch); |
1011 |
1011 |
1012 /** |
1012 /** |
1013 * \fn void SDL_LockTexture(SDL_TextureID textureID, const SDL_Rect *rect, int markDirty, void **pixels, int *pitch) |
1013 * \fn void SDL_LockTexture(SDL_TextureID textureID, const SDL_Rect *rect, int markDirty, void **pixels, int *pitch) |
1014 * |
1014 * |
1015 * \brief Lock a portion of the texture for pixel access. |
1015 * \brief Lock a portion of the texture for pixel access. |
1016 * |
1016 * |
1017 * \param texture The texture to lock for access, which must have been created with SDL_TextureAccess_Local. |
1017 * \param texture The texture to lock for access, which must have been created with SDL_TEXTUREACCESS_LOCAL. |
1018 * \param rect A pointer to the rectangle to lock for access. If the rect is NULL, the entire texture will be locked. |
1018 * \param rect A pointer to the rectangle to lock for access. If the rect is NULL, the entire texture will be locked. |
1019 * \param markDirty If this is nonzero, the locked area will be marked dirty when the texture is unlocked. |
1019 * \param markDirty If this is nonzero, the locked area will be marked dirty when the texture is unlocked. |
1020 * \param pixels This is filled in with a pointer to the locked pixels, appropriately offset by the locked area. |
1020 * \param pixels This is filled in with a pointer to the locked pixels, appropriately offset by the locked area. |
1021 * \param pitch This is filled in with the pitch of the locked pixels. |
1021 * \param pitch This is filled in with the pitch of the locked pixels. |
1022 * |
1022 * |
1023 * \return 0 on success, or -1 if the texture is not valid or was created with SDL_TextureAccess_Remote |
1023 * \return 0 on success, or -1 if the texture is not valid or was created with SDL_TEXTUREACCESS_REMOTe |
1024 * |
1024 * |
1025 * \sa SDL_DirtyTexture() |
1025 * \sa SDL_DirtyTexture() |
1026 * \sa SDL_UnlockTexture() |
1026 * \sa SDL_UnlockTexture() |
1027 */ |
1027 */ |
1028 extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_TextureID textureID, |
1028 extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_TextureID textureID, |
1043 /** |
1043 /** |
1044 * \fn void SDL_DirtyTexture(SDL_TextureID textureID, int numrects, const SDL_Rect * rects) |
1044 * \fn void SDL_DirtyTexture(SDL_TextureID textureID, int numrects, const SDL_Rect * rects) |
1045 * |
1045 * |
1046 * \brief Mark the specified rectangles of the texture as dirty. |
1046 * \brief Mark the specified rectangles of the texture as dirty. |
1047 * |
1047 * |
1048 * \note The texture must have been created with SDL_TextureAccess_Local. |
1048 * \note The texture must have been created with SDL_TEXTUREACCESS_LOCAL. |
1049 * |
1049 * |
1050 * \sa SDL_LockTexture() |
1050 * \sa SDL_LockTexture() |
1051 * \sa SDL_UnlockTexture() |
1051 * \sa SDL_UnlockTexture() |
1052 */ |
1052 */ |
1053 extern DECLSPEC void SDLCALL SDL_DirtyTexture(SDL_TextureID textureID, |
1053 extern DECLSPEC void SDLCALL SDL_DirtyTexture(SDL_TextureID textureID, |
1054 int numrects, |
1054 int numrects, |
1055 const SDL_Rect * rects); |
1055 const SDL_Rect * rects); |
1056 |
|
1057 /** |
|
1058 * \fn void SDL_SelectRenderTexture(SDL_TextureID textureID) |
|
1059 * |
|
1060 * \brief Select a texture as the rendering target, or 0 to reselect the current window. |
|
1061 * |
|
1062 * \note The texture must have been created with SDL_TextureAccess_Render. |
|
1063 */ |
|
1064 extern DECLSPEC void SDLCALL SDL_SelectRenderTexture(SDL_TextureID textureID); |
|
1065 |
1056 |
1066 /** |
1057 /** |
1067 * \fn void SDL_RenderFill(const SDL_Rect *rect, Uint32 color) |
1058 * \fn void SDL_RenderFill(const SDL_Rect *rect, Uint32 color) |
1068 * |
1059 * |
1069 * \brief Fill the current rendering target with the specified color. |
1060 * \brief Fill the current rendering target with the specified color. |