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