include/SDL_render.h
changeset 6232 37e8d0736366
parent 6138 4c64952a58fb
child 6237 240f1bced46b
--- a/include/SDL_render.h	Wed Jan 18 22:22:54 2012 -0500
+++ b/include/SDL_render.h	Wed Jan 18 22:45:49 2012 -0500
@@ -88,7 +88,8 @@
 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 @@
                                            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.
  *