include/SDL_render.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 01 Feb 2011 21:23:43 -0800
changeset 5149 be02be2ea897
parent 5147 ad50b3db78bd
child 5156 307ccc9c135e
permissions -rw-r--r--
Making the API simpler, removed support for palettized video modes and textures.
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2010 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14 
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 
    23 /**
    24  *  \file SDL_render.h
    25  *  
    26  *  Header file for SDL 2D rendering functions.
    27  */
    28 
    29 #ifndef _SDL_render_h
    30 #define _SDL_render_h
    31 
    32 #include "SDL_stdinc.h"
    33 //#include "SDL_pixels.h"
    34 #include "SDL_rect.h"
    35 #include "SDL_video.h"
    36 
    37 #include "begin_code.h"
    38 /* Set up for C function definitions, even when using C++ */
    39 #ifdef __cplusplus
    40 /* *INDENT-OFF* */
    41 extern "C" {
    42 /* *INDENT-ON* */
    43 #endif
    44 
    45 /**
    46  *  \brief Flags used when creating a rendering context
    47  */
    48 typedef enum
    49 {
    50     SDL_RENDERER_ACCELERATED = 0x00000001,      /**< The renderer uses hardware 
    51                                                      acceleration */
    52     SDL_RENDERER_PRESENTVSYNC = 0x00000002      /**< Present is synchronized 
    53                                                      with the refresh rate */
    54 } SDL_RendererFlags;
    55 
    56 /**
    57  *  \brief Information on the capabilities of a render driver or context.
    58  */
    59 typedef struct SDL_RendererInfo
    60 {
    61     const char *name;           /**< The name of the renderer */
    62     Uint32 flags;               /**< Supported ::SDL_RendererFlags */
    63     Uint32 num_texture_formats; /**< The number of available texture formats */
    64     Uint32 texture_formats[50]; /**< The available texture formats */
    65     int max_texture_width;      /**< The maximimum texture width */
    66     int max_texture_height;     /**< The maximimum texture height */
    67 } SDL_RendererInfo;
    68 
    69 /**
    70  *  \brief The access pattern allowed for a texture.
    71  */
    72 typedef enum
    73 {
    74     SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */
    75     SDL_TEXTUREACCESS_STREAMING  /**< Changes frequently, lockable */
    76 } SDL_TextureAccess;
    77 
    78 /**
    79  *  \brief The texture channel modulation used in SDL_RenderCopy().
    80  */
    81 typedef enum
    82 {
    83     SDL_TEXTUREMODULATE_NONE = 0x00000000,     /**< No modulation */
    84     SDL_TEXTUREMODULATE_COLOR = 0x00000001,    /**< srcC = srcC * color */
    85     SDL_TEXTUREMODULATE_ALPHA = 0x00000002     /**< srcA = srcA * alpha */
    86 } SDL_TextureModulate;
    87 
    88 /**
    89  *  \brief A structure representing rendering state
    90  */
    91 struct SDL_Renderer;
    92 typedef struct SDL_Renderer SDL_Renderer;
    93 
    94 /**
    95  *  \brief An efficient driver-specific representation of pixel data
    96  */
    97 struct SDL_Texture;
    98 typedef struct SDL_Texture SDL_Texture;
    99 
   100 
   101 /* Function prototypes */
   102 
   103 /**
   104  *  \brief Get the number of 2D rendering drivers available for the current 
   105  *         display.
   106  *  
   107  *  A render driver is a set of code that handles rendering and texture
   108  *  management on a particular display.  Normally there is only one, but
   109  *  some drivers may have several available with different capabilities.
   110  *  
   111  *  \sa SDL_GetRenderDriverInfo()
   112  *  \sa SDL_CreateRenderer()
   113  */
   114 extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
   115 
   116 /**
   117  *  \brief Get information about a specific 2D rendering driver for the current 
   118  *         display.
   119  *  
   120  *  \param index The index of the driver to query information about.
   121  *  \param info  A pointer to an SDL_RendererInfo struct to be filled with 
   122  *               information on the rendering driver.
   123  *  
   124  *  \return 0 on success, -1 if the index was out of range.
   125  *  
   126  *  \sa SDL_CreateRenderer()
   127  */
   128 extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
   129                                                     SDL_RendererInfo * info);
   130 
   131 /**
   132  *  \brief Create a 2D rendering context for a window.
   133  *  
   134  *  \param window The window where rendering is displayed.
   135  *  \param index    The index of the rendering driver to initialize, or -1 to 
   136  *                  initialize the first one supporting the requested flags.
   137  *  \param flags    ::SDL_RendererFlags.
   138  *  
   139  *  \return A valid rendering context or NULL if there was an error.
   140  *  
   141  *  \sa SDL_GetRendererInfo()
   142  *  \sa SDL_DestroyRenderer()
   143  */
   144 extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
   145                                                int index, Uint32 flags);
   146 
   147 /**
   148  *  \brief Get information about a rendering context.
   149  */
   150 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
   151                                                 SDL_RendererInfo * info);
   152 
   153 /**
   154  *  \brief Create a texture for a rendering context.
   155  *  
   156  *  \param format The format of the texture.
   157  *  \param access One of the enumerated values in ::SDL_TextureAccess.
   158  *  \param w      The width of the texture in pixels.
   159  *  \param h      The height of the texture in pixels.
   160  *  
   161  *  \return The created texture is returned, or 0 if no rendering context was 
   162  *          active,  the format was unsupported, or the width or height were out
   163  *          of range.
   164  *  
   165  *  \sa SDL_QueryTexture()
   166  *  \sa SDL_DestroyTexture()
   167  */
   168 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,                                                        Uint32 format,
   169                                                         int access, int w,
   170                                                         int h);
   171 
   172 /**
   173  *  \brief Create a texture from an existing surface.
   174  *  
   175  *  \param format The format of the texture, or 0 to pick an appropriate format.
   176  *  \param surface The surface containing pixel data used to fill the texture.
   177  *  
   178  *  \return The created texture is returned, or 0 if no rendering context was 
   179  *          active,  the format was unsupported, or the surface width or height 
   180  *          were out of range.
   181  *  
   182  *  \note The surface is not modified or freed by this function.
   183  *  
   184  *  \sa SDL_QueryTexture()
   185  *  \sa SDL_DestroyTexture()
   186  */
   187 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, Uint32 format, SDL_Surface * surface);
   188 
   189 /**
   190  *  \brief Query the attributes of a texture
   191  *  
   192  *  \param texture A texture to be queried.
   193  *  \param format  A pointer filled in with the raw format of the texture.  The 
   194  *                 actual format may differ, but pixel transfers will use this 
   195  *                 format.
   196  *  \param access  A pointer filled in with the actual access to the texture.
   197  *  \param w       A pointer filled in with the width of the texture in pixels.
   198  *  \param h       A pointer filled in with the height of the texture in pixels.
   199  *  
   200  *  \return 0 on success, or -1 if the texture is not valid.
   201  */
   202 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
   203                                              Uint32 * format, int *access,
   204                                              int *w, int *h);
   205 
   206 /**
   207  *  \brief Query the pixels of a texture, if the texture does not need to be 
   208  *         locked for pixel access.
   209  *  
   210  *  \param texture A texture to be queried, which was created with 
   211  *                   ::SDL_TEXTUREACCESS_STREAMING.
   212  *  \param pixels    A pointer filled with a pointer to the pixels for the 
   213  *                   texture.
   214  *  \param pitch     A pointer filled in with the pitch of the pixel data.
   215  *  
   216  *  \return 0 on success, or -1 if the texture is not valid, or must be locked 
   217  *          for pixel access.
   218  */
   219 extern DECLSPEC int SDLCALL SDL_QueryTexturePixels(SDL_Texture * texture,
   220                                                    void **pixels, int *pitch);
   221 
   222 /**
   223  *  \brief Set an additional color value used in render copy operations.
   224  *  
   225  *  \param texture The texture to update.
   226  *  \param r       The red color value multiplied into copy operations.
   227  *  \param g       The green color value multiplied into copy operations.
   228  *  \param b       The blue color value multiplied into copy operations.
   229  *  
   230  *  \return 0 on success, or -1 if the texture is not valid or color modulation 
   231  *          is not supported.
   232  *  
   233  *  \sa SDL_GetTextureColorMod()
   234  */
   235 extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
   236                                                    Uint8 r, Uint8 g, Uint8 b);
   237 
   238 
   239 /**
   240  *  \brief Get the additional color value used in render copy operations.
   241  *  
   242  *  \param texture The texture to query.
   243  *  \param r         A pointer filled in with the current red color value.
   244  *  \param g         A pointer filled in with the current green color value.
   245  *  \param b         A pointer filled in with the current blue color value.
   246  *  
   247  *  \return 0 on success, or -1 if the texture is not valid.
   248  *  
   249  *  \sa SDL_SetTextureColorMod()
   250  */
   251 extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
   252                                                    Uint8 * r, Uint8 * g,
   253                                                    Uint8 * b);
   254 
   255 /**
   256  *  \brief Set an additional alpha value used in render copy operations.
   257  *  
   258  *  \param texture The texture to update.
   259  *  \param alpha     The alpha value multiplied into copy operations.
   260  *  
   261  *  \return 0 on success, or -1 if the texture is not valid or alpha modulation 
   262  *          is not supported.
   263  *  
   264  *  \sa SDL_GetTextureAlphaMod()
   265  */
   266 extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
   267                                                    Uint8 alpha);
   268 
   269 /**
   270  *  \brief Get the additional alpha value used in render copy operations.
   271  *  
   272  *  \param texture The texture to query.
   273  *  \param alpha     A pointer filled in with the current alpha value.
   274  *  
   275  *  \return 0 on success, or -1 if the texture is not valid.
   276  *  
   277  *  \sa SDL_SetTextureAlphaMod()
   278  */
   279 extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
   280                                                    Uint8 * alpha);
   281 
   282 /**
   283  *  \brief Set the blend mode used for texture copy operations.
   284  *  
   285  *  \param texture The texture to update.
   286  *  \param blendMode ::SDL_BlendMode to use for texture blending.
   287  *  
   288  *  \return 0 on success, or -1 if the texture is not valid or the blend mode is
   289  *          not supported.
   290  *  
   291  *  \note If the blend mode is not supported, the closest supported mode is
   292  *        chosen.
   293  *  
   294  *  \sa SDL_GetTextureBlendMode()
   295  */
   296 extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
   297                                                     SDL_BlendMode blendMode);
   298 
   299 /**
   300  *  \brief Get the blend mode used for texture copy operations.
   301  *  
   302  *  \param texture The texture to query.
   303  *  \param blendMode A pointer filled in with the current blend mode.
   304  *  
   305  *  \return 0 on success, or -1 if the texture is not valid.
   306  *  
   307  *  \sa SDL_SetTextureBlendMode()
   308  */
   309 extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
   310                                                     SDL_BlendMode *blendMode);
   311 
   312 /**
   313  *  \brief Update the given texture rectangle with new pixel data.
   314  *  
   315  *  \param texture The texture to update
   316  *  \param rect      A pointer to the rectangle of pixels to update, or NULL to 
   317  *                   update the entire texture.
   318  *  \param pixels    The raw pixel data.
   319  *  \param pitch     The number of bytes between rows of pixel data.
   320  *  
   321  *  \return 0 on success, or -1 if the texture is not valid.
   322  *  
   323  *  \note This is a fairly slow function.
   324  */
   325 extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
   326                                               const SDL_Rect * rect,
   327                                               const void *pixels, int pitch);
   328 
   329 /**
   330  *  \brief Lock a portion of the texture for pixel access.
   331  *  
   332  *  \param texture The texture to lock for access, which was created with 
   333  *                   ::SDL_TEXTUREACCESS_STREAMING.
   334  *  \param rect      A pointer to the rectangle to lock for access. If the rect 
   335  *                   is NULL, the entire texture will be locked.
   336  *  \param markDirty If this is nonzero, the locked area will be marked dirty 
   337  *                   when the texture is unlocked.
   338  *  \param pixels    This is filled in with a pointer to the locked pixels, 
   339  *                   appropriately offset by the locked area.
   340  *  \param pitch     This is filled in with the pitch of the locked pixels.
   341  *  
   342  *  \return 0 on success, or -1 if the texture is not valid or was created with 
   343  *          ::SDL_TEXTUREACCESS_STATIC.
   344  *  
   345  *  \sa SDL_DirtyTexture()
   346  *  \sa SDL_UnlockTexture()
   347  */
   348 extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
   349                                             const SDL_Rect * rect,
   350                                             int markDirty, void **pixels,
   351                                             int *pitch);
   352 
   353 /**
   354  *  \brief Unlock a texture, uploading the changes to renderer memory, if needed.
   355  *  
   356  *  \sa SDL_LockTexture()
   357  *  \sa SDL_DirtyTexture()
   358  */
   359 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
   360 
   361 /**
   362  *  \brief Mark the specified rectangles of the texture as dirty.
   363  *  
   364  *  \param texture The texture to mark dirty, which was created with 
   365  *                   ::SDL_TEXTUREACCESS_STREAMING.
   366  *  \param numrects  The number of rectangles pointed to by rects.
   367  *  \param rects     The pointer to an array of dirty rectangles.
   368  *  
   369  *  \sa SDL_LockTexture()
   370  *  \sa SDL_UnlockTexture()
   371  */
   372 extern DECLSPEC void SDLCALL SDL_DirtyTexture(SDL_Texture * texture,
   373                                               int numrects,
   374                                               const SDL_Rect * rects);
   375 
   376 /**
   377  *  \brief Set the color used for drawing operations (Fill and Line).
   378  *  
   379  *  \param r The red value used to draw on the rendering target.
   380  *  \param g The green value used to draw on the rendering target.
   381  *  \param b The blue value used to draw on the rendering target.
   382  *  \param a The alpha value used to draw on the rendering target, usually 
   383  *           ::SDL_ALPHA_OPAQUE (255).
   384  *  
   385  *  \return 0 on success, or -1 on error
   386  */
   387 extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer,
   388                                            Uint8 r, Uint8 g, Uint8 b,
   389                                            Uint8 a);
   390 
   391 /**
   392  *  \brief Get the color used for drawing operations (Fill and Line).
   393  *  
   394  *  \param r A pointer to the red value used to draw on the rendering target.
   395  *  \param g A pointer to the green value used to draw on the rendering target.
   396  *  \param b A pointer to the blue value used to draw on the rendering target.
   397  *  \param a A pointer to the alpha value used to draw on the rendering target, 
   398  *           usually ::SDL_ALPHA_OPAQUE (255).
   399  *  
   400  *  \return 0 on success, or -1 on error
   401  */
   402 extern DECLSPEC int SDL_GetRenderDrawColor(SDL_Renderer * renderer,
   403                                            Uint8 * r, Uint8 * g, Uint8 * b,
   404                                            Uint8 * a);
   405 
   406 /**
   407  *  \brief Set the blend mode used for drawing operations (Fill and Line).
   408  *  
   409  *  \param blendMode ::SDL_BlendMode to use for blending.
   410  *  
   411  *  \return 0 on success, or -1 on error
   412  *  
   413  *  \note If the blend mode is not supported, the closest supported mode is 
   414  *        chosen.
   415  *  
   416  *  \sa SDL_GetRenderDrawBlendMode()
   417  */
   418 extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
   419                                                        SDL_BlendMode blendMode);
   420 
   421 /**
   422  *  \brief Get the blend mode used for drawing operations.
   423  *  
   424  *  \param blendMode A pointer filled in with the current blend mode.
   425  *  
   426  *  \return 0 on success, or -1 on error
   427  *  
   428  *  \sa SDL_SetRenderDrawBlendMode()
   429  */
   430 extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
   431                                                        SDL_BlendMode *blendMode);
   432 
   433 /**
   434  *  \brief Clear the current rendering target with the drawing color
   435  */
   436 extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
   437 
   438 /**
   439  *  \brief Draw a point on the current rendering target.
   440  *  
   441  *  \param x The x coordinate of the point.
   442  *  \param y The y coordinate of the point.
   443  *  
   444  *  \return 0 on success, or -1 on error
   445  */
   446 extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
   447                                                 int x, int y);
   448 
   449 /**
   450  *  \brief Draw multiple points on the current rendering target.
   451  *  
   452  *  \param points The points to draw
   453  *  \param count The number of points to draw
   454  *  
   455  *  \return 0 on success, or -1 on error
   456  */
   457 extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
   458                                                  const SDL_Point * points,
   459                                                  int count);
   460 
   461 /**
   462  *  \brief Draw a line on the current rendering target.
   463  *  
   464  *  \param x1 The x coordinate of the start point.
   465  *  \param y1 The y coordinate of the start point.
   466  *  \param x2 The x coordinate of the end point.
   467  *  \param y2 The y coordinate of the end point.
   468  *  
   469  *  \return 0 on success, or -1 on error
   470  */
   471 extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
   472                                                int x1, int y1, int x2, int y2);
   473 
   474 /**
   475  *  \brief Draw a series of connected lines on the current rendering target.
   476  *  
   477  *  \param points The points along the lines
   478  *  \param count The number of points, drawing count-1 lines
   479  *  
   480  *  \return 0 on success, or -1 on error
   481  */
   482 extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
   483                                                 const SDL_Point * points,
   484                                                 int count);
   485 
   486 /**
   487  *  \brief Draw a rectangle on the current rendering target.
   488  *  
   489  *  \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
   490  *  
   491  *  \return 0 on success, or -1 on error
   492  */
   493 extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
   494                                                const SDL_Rect * rect);
   495 
   496 /**
   497  *  \brief Draw some number of rectangles on the current rendering target.
   498  *  
   499  *  \param rects A pointer to an array of destination rectangles.
   500  *  \param count The number of rectangles.
   501  *  
   502  *  \return 0 on success, or -1 on error
   503  */
   504 extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
   505                                                 const SDL_Rect ** rects,
   506                                                 int count);
   507 
   508 /**
   509  *  \brief Fill a rectangle on the current rendering target with the drawing color.
   510  *  
   511  *  \param rect A pointer to the destination rectangle, or NULL for the entire 
   512  *              rendering target.
   513  *  
   514  *  \return 0 on success, or -1 on error
   515  */
   516 extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
   517                                                const SDL_Rect * rect);
   518 
   519 /**
   520  *  \brief Fill some number of rectangles on the current rendering target with the drawing color.
   521  *  
   522  *  \param rects A pointer to an array of destination rectangles.
   523  *  \param count The number of rectangles.
   524  *  
   525  *  \return 0 on success, or -1 on error
   526  */
   527 extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
   528                                                 const SDL_Rect ** rect,
   529                                                 int count);
   530 
   531 /**
   532  *  \brief Copy a portion of the texture to the current rendering target.
   533  *  
   534  *  \param texture The source texture.
   535  *  \param srcrect   A pointer to the source rectangle, or NULL for the entire 
   536  *                   texture.
   537  *  \param dstrect   A pointer to the destination rectangle, or NULL for the 
   538  *                   entire rendering target.
   539  *  
   540  *  \return 0 on success, or -1 on error
   541  */
   542 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
   543                                            SDL_Texture * texture,
   544                                            const SDL_Rect * srcrect,
   545                                            const SDL_Rect * dstrect);
   546 
   547 /**
   548  *  \brief Read pixels from the current rendering target.
   549  *  
   550  *  \param rect   A pointer to the rectangle to read, or NULL for the entire 
   551  *                render target.
   552  *  \param format The desired format of the pixel data, or 0 to use the format
   553  *                of the rendering target
   554  *  \param pixels A pointer to be filled in with the pixel data
   555  *  \param pitch  The pitch of the pixels parameter.
   556  *  
   557  *  \return 0 on success, or -1 if pixel reading is not supported.
   558  *  
   559  *  \warning This is a very slow operation, and should not be used frequently.
   560  */
   561 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
   562                                                  const SDL_Rect * rect,
   563                                                  Uint32 format,
   564                                                  void *pixels, int pitch);
   565 
   566 /**
   567  *  \brief Write pixels to the current rendering target.
   568  *  
   569  *  \param rect   A pointer to the rectangle to write, or NULL for the entire 
   570  *                render target.
   571  *  \param format The format of the pixel data, or 0 to use the format
   572  *                of the rendering target
   573  *  \param pixels A pointer to the pixel data to write.
   574  *  \param pitch  The pitch of the pixels parameter.
   575  *  
   576  *  \return 0 on success, or -1 if pixel writing is not supported.
   577  *  
   578  *  \warning This is a very slow operation, and should not be used frequently.
   579  */
   580 extern DECLSPEC int SDLCALL SDL_RenderWritePixels(SDL_Renderer * renderer,
   581                                                   const SDL_Rect * rect,
   582                                                   Uint32 format,
   583                                                   const void *pixels,
   584                                                   int pitch);
   585 
   586 /**
   587  *  \brief Update the screen with rendering performed.
   588  */
   589 extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);
   590 
   591 /**
   592  *  \brief Destroy the specified texture.
   593  *  
   594  *  \sa SDL_CreateTexture()
   595  *  \sa SDL_CreateTextureFromSurface()
   596  */
   597 extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
   598 
   599 /**
   600  *  \brief Destroy the rendering context for a window and free associated
   601  *         textures.
   602  *  
   603  *  \sa SDL_CreateRenderer()
   604  */
   605 extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
   606 
   607 
   608 /* Ends C function definitions when using C++ */
   609 #ifdef __cplusplus
   610 /* *INDENT-OFF* */
   611 }
   612 /* *INDENT-ON* */
   613 #endif
   614 #include "close_code.h"
   615 
   616 #endif /* _SDL_render_h */
   617 
   618 /* vi: set ts=4 sw=4 expandtab: */