Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Implementation of render targets, by Mason Wheeler and Gabriel Jacobo

Thanks guys!
  • Loading branch information
slouken committed Jan 19, 2012
1 parent 972b4ce commit 3743e40e4071b53012c44e7ac41aabeded0f6d2b

File 1 of 11 in 3743e40

@@ -88,7 +88,8 @@ typedef struct SDL_RendererInfo
typedef enum
{
SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */
SDL_TEXTUREACCESS_STREAMING /**< Changes frequently, lockable */
SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
SDL_TEXTUREACCESS_TARGET /**< Texture can be used as a render target */
} SDL_TextureAccess;

/**
@@ -561,6 +562,31 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
const SDL_Rect * srcrect,
const SDL_Rect * dstrect);


/**
* \fn SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer)
*
* \brief Determines whether a window supports the use of render targets
*
* \param renderer The renderer that will be checked
*
* \return SDL_TRUE if supported, SDL_FALSE if not.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);

/**
* \fn int SDL_SetTargetTexture(SDL_Renderer *renderer, SDL_Texture *texture)
*
* \brief Set a texture as the current rendering target.
*
* \param renderer The renderer that will be checked
*
* \param texture The targeted texture, or NULL for the default render target
*
* \return 0 on success, or -1 if there is no rendering context current, or the driver doesn't support the requested operation.
*/
extern DECLSPEC int SDLCALL SDL_SetTargetTexture(SDL_Renderer *renderer, SDL_Texture *texture);

/**
* \brief Read pixels from the current rendering target.
*

0 comments on commit 3743e40

Please sign in to comment.