include/SDL_video.h
branchSDL-1.3
changeset 1678 90bf530ced8e
parent 1676 e136f3ffdc1b
child 1681 80a5e6a4e1e2
     1.1 --- a/include/SDL_video.h	Tue Jun 13 04:37:45 2006 +0000
     1.2 +++ b/include/SDL_video.h	Wed Jun 14 06:14:26 2006 +0000
     1.3 @@ -767,7 +767,7 @@
     1.4  /**
     1.5   * \fn SDL_TextureID SDL_CreateTextureFromSurface(Uint32 format, int access, SDL_Surface *surface)
     1.6   *
     1.7 - * \brief Create a texture from an existing surface
     1.8 + * \brief Create a texture from an existing surface.
     1.9   *
    1.10   * \param format The format of the texture, or 0 to pick an appropriate format
    1.11   * \param access One of the enumerated values in SDL_TextureAccess
    1.12 @@ -804,6 +804,20 @@
    1.13                                               int *w, int *h);
    1.14  
    1.15  /**
    1.16 + * \fn int SDL_QueryTexturePixels(SDL_TextureID textureID, void **pixels, int pitch)
    1.17 + *
    1.18 + * \brief Query the pixels of a texture, if the texture does not need to be locked for pixel access.
    1.19 + *
    1.20 + * \param texture A texture to be queried, which was created with SDL_TextureAccess_Local
    1.21 + * \param pixels A pointer filled with a pointer to the pixels for the texture 
    1.22 + * \param pitch A pointer filled in with the pitch of the pixel data
    1.23 + *
    1.24 + * \return 0 on success, or -1 if the texture is not valid, or must be locked for pixel access.
    1.25 + */
    1.26 +extern DECLSPEC int SDLCALL SDL_QueryTexturePixels(SDL_TextureID textureID,
    1.27 +                                                   void **pixels, int *pitch);
    1.28 +
    1.29 +/**
    1.30   * \fn int SDL_SetTexturePalette(SDL_TextureID textureID, SDL_Color * colors, int firstcolor, int ncolors)
    1.31   *
    1.32   * \brief Update an indexed texture with a color palette