include/SDL_video.h
branchSDL-1.3
changeset 1678 90bf530ced8e
parent 1676 e136f3ffdc1b
child 1681 80a5e6a4e1e2
equal deleted inserted replaced
1677:5e4c5e095925 1678:90bf530ced8e
   765                                                         int h);
   765                                                         int h);
   766 
   766 
   767 /**
   767 /**
   768  * \fn SDL_TextureID SDL_CreateTextureFromSurface(Uint32 format, int access, SDL_Surface *surface)
   768  * \fn SDL_TextureID SDL_CreateTextureFromSurface(Uint32 format, int access, SDL_Surface *surface)
   769  *
   769  *
   770  * \brief Create a texture from an existing surface
   770  * \brief Create a texture from an existing surface.
   771  *
   771  *
   772  * \param format The format of the texture, or 0 to pick an appropriate format
   772  * \param format The format of the texture, or 0 to pick an appropriate format
   773  * \param access One of the enumerated values in SDL_TextureAccess
   773  * \param access One of the enumerated values in SDL_TextureAccess
   774  * \param surface The surface containing pixel data used to fill the texture
   774  * \param surface The surface containing pixel data used to fill the texture
   775  *
   775  *
   800  * \return 0 on success, or -1 if the texture is not valid
   800  * \return 0 on success, or -1 if the texture is not valid
   801  */
   801  */
   802 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_TextureID textureID,
   802 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_TextureID textureID,
   803                                              Uint32 * format, int *access,
   803                                              Uint32 * format, int *access,
   804                                              int *w, int *h);
   804                                              int *w, int *h);
       
   805 
       
   806 /**
       
   807  * \fn int SDL_QueryTexturePixels(SDL_TextureID textureID, void **pixels, int pitch)
       
   808  *
       
   809  * \brief Query the pixels of a texture, if the texture does not need to be locked for pixel access.
       
   810  *
       
   811  * \param texture A texture to be queried, which was created with SDL_TextureAccess_Local
       
   812  * \param pixels A pointer filled with a pointer to the pixels for the texture 
       
   813  * \param pitch A pointer filled in with the pitch of the pixel data
       
   814  *
       
   815  * \return 0 on success, or -1 if the texture is not valid, or must be locked for pixel access.
       
   816  */
       
   817 extern DECLSPEC int SDLCALL SDL_QueryTexturePixels(SDL_TextureID textureID,
       
   818                                                    void **pixels, int *pitch);
   805 
   819 
   806 /**
   820 /**
   807  * \fn int SDL_SetTexturePalette(SDL_TextureID textureID, SDL_Color * colors, int firstcolor, int ncolors)
   821  * \fn int SDL_SetTexturePalette(SDL_TextureID textureID, SDL_Color * colors, int firstcolor, int ncolors)
   808  *
   822  *
   809  * \brief Update an indexed texture with a color palette
   823  * \brief Update an indexed texture with a color palette