include/SDL_render.h
changeset 6247 b6212690f78d
parent 6237 240f1bced46b
child 6248 7fe4b2b78acc
equal deleted inserted replaced
6246:c70ec935a4bb 6247:b6212690f78d
   371  *  \sa SDL_LockTexture()
   371  *  \sa SDL_LockTexture()
   372  */
   372  */
   373 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
   373 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
   374 
   374 
   375 /**
   375 /**
       
   376  * \brief Determines whether a window supports the use of render targets
       
   377  *
       
   378  * \param renderer The renderer that will be checked
       
   379  *
       
   380  * \return SDL_TRUE if supported, SDL_FALSE if not.
       
   381  */
       
   382 extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
       
   383 
       
   384 /**
       
   385  * \brief Set a texture as the current rendering target.
       
   386  *
       
   387  * \param texture The targeted texture, or NULL for the default render target
       
   388  *
       
   389  * \return 0 on success, or -1 on error
       
   390  */
       
   391 extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
       
   392                                                 SDL_Texture *texture);
       
   393 
       
   394 /**
   376  *  \brief Set the drawing area for rendering on the current target.
   395  *  \brief Set the drawing area for rendering on the current target.
   377  *
   396  *
   378  *  \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.
   397  *  \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.
   379  *
   398  *
   380  *  The x,y of the viewport rect represents the origin for rendering.
   399  *  The x,y of the viewport rect represents the origin for rendering.
   562 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
   581 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
   563                                            SDL_Texture * texture,
   582                                            SDL_Texture * texture,
   564                                            const SDL_Rect * srcrect,
   583                                            const SDL_Rect * srcrect,
   565                                            const SDL_Rect * dstrect);
   584                                            const SDL_Rect * dstrect);
   566 
   585 
   567 
       
   568 /**
       
   569  * \fn SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer)
       
   570  *
       
   571  * \brief Determines whether a window supports the use of render targets
       
   572  *
       
   573  * \param renderer The renderer that will be checked
       
   574  *
       
   575  * \return SDL_TRUE if supported, SDL_FALSE if not.
       
   576  */
       
   577 extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
       
   578 
       
   579 /**
       
   580  * \fn int SDL_SetTargetTexture(SDL_Renderer *renderer, SDL_Texture *texture)
       
   581  *
       
   582  * \brief Set a texture as the current rendering target.
       
   583  *
       
   584  * \param renderer The renderer that will be checked
       
   585  *
       
   586  * \param texture The targeted texture, or NULL for the default render target
       
   587  *
       
   588  * \return 0 on success, or -1 if there is no rendering context current, or the driver doesn't support the requested operation.
       
   589  */
       
   590 extern DECLSPEC int SDLCALL SDL_SetTargetTexture(SDL_Renderer *renderer, SDL_Texture *texture);
       
   591 
   586 
   592 /**
   587 /**
   593  *  \brief Read pixels from the current rendering target.
   588  *  \brief Read pixels from the current rendering target.
   594  *  
   589  *  
   595  *  \param rect   A pointer to the rectangle to read, or NULL for the entire 
   590  *  \param rect   A pointer to the rectangle to read, or NULL for the entire