include/SDL_render.h
changeset 6232 37e8d0736366
parent 6138 4c64952a58fb
child 6237 240f1bced46b
     1.1 --- a/include/SDL_render.h	Wed Jan 18 22:22:54 2012 -0500
     1.2 +++ b/include/SDL_render.h	Wed Jan 18 22:45:49 2012 -0500
     1.3 @@ -88,7 +88,8 @@
     1.4  typedef enum
     1.5  {
     1.6      SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */
     1.7 -    SDL_TEXTUREACCESS_STREAMING  /**< Changes frequently, lockable */
     1.8 +    SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
     1.9 +    SDL_TEXTUREACCESS_TARGET     /**< Texture can be used as a render target */
    1.10  } SDL_TextureAccess;
    1.11  
    1.12  /**
    1.13 @@ -561,6 +562,31 @@
    1.14                                             const SDL_Rect * srcrect,
    1.15                                             const SDL_Rect * dstrect);
    1.16  
    1.17 +
    1.18 +/**
    1.19 + * \fn SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer)
    1.20 + *
    1.21 + * \brief Determines whether a window supports the use of render targets
    1.22 + *
    1.23 + * \param renderer The renderer that will be checked
    1.24 + *
    1.25 + * \return SDL_TRUE if supported, SDL_FALSE if not.
    1.26 + */
    1.27 +extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
    1.28 +
    1.29 +/**
    1.30 + * \fn int SDL_SetTargetTexture(SDL_Renderer *renderer, SDL_Texture *texture)
    1.31 + *
    1.32 + * \brief Set a texture as the current rendering target.
    1.33 + *
    1.34 + * \param renderer The renderer that will be checked
    1.35 + *
    1.36 + * \param texture The targeted texture, or NULL for the default render target
    1.37 + *
    1.38 + * \return 0 on success, or -1 if there is no rendering context current, or the driver doesn't support the requested operation.
    1.39 + */
    1.40 +extern DECLSPEC int SDLCALL SDL_SetTargetTexture(SDL_Renderer *renderer, SDL_Texture *texture);
    1.41 +
    1.42  /**
    1.43   *  \brief Read pixels from the current rendering target.
    1.44   *