include/SDL_render.h
changeset 6232 37e8d0736366
parent 6138 4c64952a58fb
child 6237 240f1bced46b
equal deleted inserted replaced
6231:5eecf59b698f 6232:37e8d0736366
    86  *  \brief The access pattern allowed for a texture.
    86  *  \brief The access pattern allowed for a texture.
    87  */
    87  */
    88 typedef enum
    88 typedef enum
    89 {
    89 {
    90     SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */
    90     SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */
    91     SDL_TEXTUREACCESS_STREAMING  /**< Changes frequently, lockable */
    91     SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
       
    92     SDL_TEXTUREACCESS_TARGET     /**< Texture can be used as a render target */
    92 } SDL_TextureAccess;
    93 } SDL_TextureAccess;
    93 
    94 
    94 /**
    95 /**
    95  *  \brief The texture channel modulation used in SDL_RenderCopy().
    96  *  \brief The texture channel modulation used in SDL_RenderCopy().
    96  */
    97  */
   559 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
   560 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
   560                                            SDL_Texture * texture,
   561                                            SDL_Texture * texture,
   561                                            const SDL_Rect * srcrect,
   562                                            const SDL_Rect * srcrect,
   562                                            const SDL_Rect * dstrect);
   563                                            const SDL_Rect * dstrect);
   563 
   564 
       
   565 
       
   566 /**
       
   567  * \fn SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer)
       
   568  *
       
   569  * \brief Determines whether a window supports the use of render targets
       
   570  *
       
   571  * \param renderer The renderer that will be checked
       
   572  *
       
   573  * \return SDL_TRUE if supported, SDL_FALSE if not.
       
   574  */
       
   575 extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
       
   576 
       
   577 /**
       
   578  * \fn int SDL_SetTargetTexture(SDL_Renderer *renderer, SDL_Texture *texture)
       
   579  *
       
   580  * \brief Set a texture as the current rendering target.
       
   581  *
       
   582  * \param renderer The renderer that will be checked
       
   583  *
       
   584  * \param texture The targeted texture, or NULL for the default render target
       
   585  *
       
   586  * \return 0 on success, or -1 if there is no rendering context current, or the driver doesn't support the requested operation.
       
   587  */
       
   588 extern DECLSPEC int SDLCALL SDL_SetTargetTexture(SDL_Renderer *renderer, SDL_Texture *texture);
       
   589 
   564 /**
   590 /**
   565  *  \brief Read pixels from the current rendering target.
   591  *  \brief Read pixels from the current rendering target.
   566  *  
   592  *  
   567  *  \param rect   A pointer to the rectangle to read, or NULL for the entire 
   593  *  \param rect   A pointer to the rectangle to read, or NULL for the entire 
   568  *                render target.
   594  *                render target.