include/SDL_render.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 29 Nov 2014 11:18:49 -0800
changeset 9248 dabd5df43970
parent 9199 9418826f6341
child 9323 91953d0abe82
permissions -rw-r--r--
Improved the pitch variable description
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     1
/*
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
     2
  Simple DirectMedia Layer
8149
681eb46b8ac4 Fixed bug 2374 - Update copyright for 2014...
Sam Lantinga <slouken@libsdl.org>
parents: 8028
diff changeset
     3
  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     4
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
     5
  This software is provided 'as-is', without any express or implied
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
     6
  warranty.  In no event will the authors be held liable for any damages
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
     7
  arising from the use of this software.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     8
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
     9
  Permission is granted to anyone to use this software for any purpose,
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
    10
  including commercial applications, and to alter it and redistribute it
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
    11
  freely, subject to the following restrictions:
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    12
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
    13
  1. The origin of this software must not be misrepresented; you must not
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
    14
     claim that you wrote the original software. If you use this software
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
    15
     in a product, an acknowledgment in the product documentation would be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
    16
     appreciated but is not required.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
    17
  2. Altered source versions must be plainly marked as such, and must not be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
    18
     misrepresented as being the original software.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5528
diff changeset
    19
  3. This notice may not be removed or altered from any source distribution.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    20
*/
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    21
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    22
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    23
 *  \file SDL_render.h
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    24
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    25
 *  Header file for SDL 2D rendering functions.
5164
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    26
 *
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    27
 *  This API supports the following features:
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    28
 *      * single pixel points
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    29
 *      * single pixel lines
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    30
 *      * filled rectangles
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    31
 *      * texture images
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    32
 *
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    33
 *  The primitives may be drawn in opaque, blended, or additive modes.
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    34
 *
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    35
 *  The texture images may be drawn in opaque, blended, or additive modes.
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    36
 *  They can have an additional color tint or alpha modulation applied to
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    37
 *  them, and may also be stretched with linear interpolation.
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    38
 *
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    39
 *  This API is designed to accelerate simple 2D operations. You may
7542
399ff49069a5 Added documentation saying the render API isn't for multi-threading.
Sam Lantinga <slouken@libsdl.org>
parents: 7240
diff changeset
    40
 *  want more functionality such as polygons and particle effects and
5164
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    41
 *  in that case you should use SDL's OpenGL/Direct3D support or one
97423d858a1a Added an intro to the features and goals of the 2D rendering API.
Sam Lantinga <slouken@libsdl.org>
parents: 5158
diff changeset
    42
 *  of the many good 3D engines.
7542
399ff49069a5 Added documentation saying the render API isn't for multi-threading.
Sam Lantinga <slouken@libsdl.org>
parents: 7240
diff changeset
    43
 *
399ff49069a5 Added documentation saying the render API isn't for multi-threading.
Sam Lantinga <slouken@libsdl.org>
parents: 7240
diff changeset
    44
 *  These functions must be called from the main thread.
399ff49069a5 Added documentation saying the render API isn't for multi-threading.
Sam Lantinga <slouken@libsdl.org>
parents: 7240
diff changeset
    45
 *  See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    46
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    47
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    48
#ifndef _SDL_render_h
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    49
#define _SDL_render_h
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    50
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    51
#include "SDL_stdinc.h"
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    52
#include "SDL_rect.h"
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    53
#include "SDL_video.h"
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    54
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    55
#include "begin_code.h"
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    56
/* Set up for C function definitions, even when using C++ */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    57
#ifdef __cplusplus
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    58
extern "C" {
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    59
#endif
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    60
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    61
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    62
 *  \brief Flags used when creating a rendering context
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    63
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    64
typedef enum
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    65
{
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    66
    SDL_RENDERER_SOFTWARE = 0x00000001,         /**< The renderer is a software fallback */
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    67
    SDL_RENDERER_ACCELERATED = 0x00000002,      /**< The renderer uses hardware
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    68
                                                     acceleration */
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
    69
    SDL_RENDERER_PRESENTVSYNC = 0x00000004,     /**< Present is synchronized
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    70
                                                     with the refresh rate */
6237
240f1bced46b Added a renderer flag to expose whether a renderer supports render to texture.
Sam Lantinga <slouken@libsdl.org>
parents: 6232
diff changeset
    71
    SDL_RENDERER_TARGETTEXTURE = 0x00000008     /**< The renderer supports
240f1bced46b Added a renderer flag to expose whether a renderer supports render to texture.
Sam Lantinga <slouken@libsdl.org>
parents: 6232
diff changeset
    72
                                                     rendering to texture */
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    73
} SDL_RendererFlags;
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    74
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    75
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    76
 *  \brief Information on the capabilities of a render driver or context.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    77
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    78
typedef struct SDL_RendererInfo
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    79
{
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    80
    const char *name;           /**< The name of the renderer */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    81
    Uint32 flags;               /**< Supported ::SDL_RendererFlags */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    82
    Uint32 num_texture_formats; /**< The number of available texture formats */
5156
307ccc9c135e Made it possible to create a texture of any format, even if not supported by the renderer.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
    83
    Uint32 texture_formats[16]; /**< The available texture formats */
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    84
    int max_texture_width;      /**< The maximimum texture width */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    85
    int max_texture_height;     /**< The maximimum texture height */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    86
} SDL_RendererInfo;
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    87
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    88
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    89
 *  \brief The access pattern allowed for a texture.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    90
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    91
typedef enum
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    92
{
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    93
    SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */
6232
37e8d0736366 Implementation of render targets, by Mason Wheeler and Gabriel Jacobo
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
    94
    SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
37e8d0736366 Implementation of render targets, by Mason Wheeler and Gabriel Jacobo
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
    95
    SDL_TEXTUREACCESS_TARGET     /**< Texture can be used as a render target */
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    96
} SDL_TextureAccess;
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    97
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    98
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    99
 *  \brief The texture channel modulation used in SDL_RenderCopy().
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   100
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   101
typedef enum
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   102
{
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   103
    SDL_TEXTUREMODULATE_NONE = 0x00000000,     /**< No modulation */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   104
    SDL_TEXTUREMODULATE_COLOR = 0x00000001,    /**< srcC = srcC * color */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   105
    SDL_TEXTUREMODULATE_ALPHA = 0x00000002     /**< srcA = srcA * alpha */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   106
} SDL_TextureModulate;
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   107
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   108
/**
6320
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   109
 *  \brief Flip constants for SDL_RenderCopyEx
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   110
 */
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   111
typedef enum
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   112
{
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   113
    SDL_FLIP_NONE = 0x00000000,     /**< Do not flip */
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   114
    SDL_FLIP_HORIZONTAL = 0x00000001,    /**< flip horizontally */
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   115
    SDL_FLIP_VERTICAL = 0x00000002     /**< flip vertically */
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   116
} SDL_RendererFlip;
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   117
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   118
/**
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   119
 *  \brief A structure representing rendering state
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   120
 */
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   121
struct SDL_Renderer;
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   122
typedef struct SDL_Renderer SDL_Renderer;
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   123
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   124
/**
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   125
 *  \brief An efficient driver-specific representation of pixel data
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   126
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   127
struct SDL_Texture;
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   128
typedef struct SDL_Texture SDL_Texture;
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   129
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   130
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   131
/* Function prototypes */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   132
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   133
/**
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   134
 *  \brief Get the number of 2D rendering drivers available for the current
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   135
 *         display.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   136
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   137
 *  A render driver is a set of code that handles rendering and texture
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   138
 *  management on a particular display.  Normally there is only one, but
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   139
 *  some drivers may have several available with different capabilities.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   140
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   141
 *  \sa SDL_GetRenderDriverInfo()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   142
 *  \sa SDL_CreateRenderer()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   143
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   144
extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   146
/**
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   147
 *  \brief Get information about a specific 2D rendering driver for the current
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   148
 *         display.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   149
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   150
 *  \param index The index of the driver to query information about.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   151
 *  \param info  A pointer to an SDL_RendererInfo struct to be filled with
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   152
 *               information on the rendering driver.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   153
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   154
 *  \return 0 on success, -1 if the index was out of range.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   155
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   156
 *  \sa SDL_CreateRenderer()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   157
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   158
extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   159
                                                    SDL_RendererInfo * info);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   160
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   161
/**
6258
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   162
 *  \brief Create a window and default renderer
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   163
 *
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   164
 *  \param width    The width of the window
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   165
 *  \param height   The height of the window
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   166
 *  \param window_flags The flags used to create the window
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   167
 *  \param window   A pointer filled with the window, or NULL on error
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   168
 *  \param renderer A pointer filled with the renderer, or NULL on error
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   169
 *
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   170
 *  \return 0 on success, or -1 on error
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   171
 */
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   172
extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   173
                                int width, int height, Uint32 window_flags,
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   174
                                SDL_Window **window, SDL_Renderer **renderer);
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   175
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   176
fce7ce72677b Added a convenience function SDL_CreateWindowAndRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 6248
diff changeset
   177
/**
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   178
 *  \brief Create a 2D rendering context for a window.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   179
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   180
 *  \param window The window where rendering is displayed.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   181
 *  \param index    The index of the rendering driver to initialize, or -1 to
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   182
 *                  initialize the first one supporting the requested flags.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   183
 *  \param flags    ::SDL_RendererFlags.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   184
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   185
 *  \return A valid rendering context or NULL if there was an error.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   186
 *
5166
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   187
 *  \sa SDL_CreateSoftwareRenderer()
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   188
 *  \sa SDL_GetRendererInfo()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   189
 *  \sa SDL_DestroyRenderer()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   190
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   191
extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   192
                                               int index, Uint32 flags);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   193
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   194
/**
5166
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   195
 *  \brief Create a 2D software rendering context for a surface.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   196
 *
5166
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   197
 *  \param surface The surface where rendering is done.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   198
 *
5166
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   199
 *  \return A valid rendering context or NULL if there was an error.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   200
 *
5166
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   201
 *  \sa SDL_CreateRenderer()
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   202
 *  \sa SDL_DestroyRenderer()
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   203
 */
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   204
extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   205
4d39eeaad00b Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5164
diff changeset
   206
/**
5528
15c9c03a80cc Added SDL_GetRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 5486
diff changeset
   207
 *  \brief Get the renderer associated with a window.
15c9c03a80cc Added SDL_GetRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 5486
diff changeset
   208
 */
15c9c03a80cc Added SDL_GetRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 5486
diff changeset
   209
extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
15c9c03a80cc Added SDL_GetRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 5486
diff changeset
   210
15c9c03a80cc Added SDL_GetRenderer()
Sam Lantinga <slouken@libsdl.org>
parents: 5486
diff changeset
   211
/**
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   212
 *  \brief Get information about a rendering context.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   213
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   214
extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   215
                                                SDL_RendererInfo * info);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   216
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   217
/**
7239
04dda95ba22c Fixed bug 1622 - SDL_RenderSetViewport with empty SDL_Rect raises wrong error for OpenGL rendering backend
Sam Lantinga <slouken@libsdl.org>
parents: 7191
diff changeset
   218
 *  \brief Get the output size of a rendering context.
04dda95ba22c Fixed bug 1622 - SDL_RenderSetViewport with empty SDL_Rect raises wrong error for OpenGL rendering backend
Sam Lantinga <slouken@libsdl.org>
parents: 7191
diff changeset
   219
 */
04dda95ba22c Fixed bug 1622 - SDL_RenderSetViewport with empty SDL_Rect raises wrong error for OpenGL rendering backend
Sam Lantinga <slouken@libsdl.org>
parents: 7191
diff changeset
   220
extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
04dda95ba22c Fixed bug 1622 - SDL_RenderSetViewport with empty SDL_Rect raises wrong error for OpenGL rendering backend
Sam Lantinga <slouken@libsdl.org>
parents: 7191
diff changeset
   221
                                                      int *w, int *h);
04dda95ba22c Fixed bug 1622 - SDL_RenderSetViewport with empty SDL_Rect raises wrong error for OpenGL rendering backend
Sam Lantinga <slouken@libsdl.org>
parents: 7191
diff changeset
   222
04dda95ba22c Fixed bug 1622 - SDL_RenderSetViewport with empty SDL_Rect raises wrong error for OpenGL rendering backend
Sam Lantinga <slouken@libsdl.org>
parents: 7191
diff changeset
   223
/**
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   224
 *  \brief Create a texture for a rendering context.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   225
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   226
 *  \param renderer The renderer.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   227
 *  \param format The format of the texture.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   228
 *  \param access One of the enumerated values in ::SDL_TextureAccess.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   229
 *  \param w      The width of the texture in pixels.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   230
 *  \param h      The height of the texture in pixels.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   231
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   232
 *  \return The created texture is returned, or 0 if no rendering context was
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   233
 *          active,  the format was unsupported, or the width or height were out
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   234
 *          of range.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   235
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   236
 *  \sa SDL_QueryTexture()
5216
16d5e8e90e01 Updated testoverlay2 to use the SDL 2D rendering API
Sam Lantinga <slouken@libsdl.org>
parents: 5166
diff changeset
   237
 *  \sa SDL_UpdateTexture()
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   238
 *  \sa SDL_DestroyTexture()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   239
 */
5344
94189aa89b54 Whoops, the format parameter was off the page.
Sam Lantinga <slouken@libsdl.org>
parents: 5337
diff changeset
   240
extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
94189aa89b54 Whoops, the format parameter was off the page.
Sam Lantinga <slouken@libsdl.org>
parents: 5337
diff changeset
   241
                                                        Uint32 format,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   242
                                                        int access, int w,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   243
                                                        int h);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   244
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   245
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   246
 *  \brief Create a texture from an existing surface.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   247
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   248
 *  \param renderer The renderer.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   249
 *  \param surface The surface containing pixel data used to fill the texture.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   250
 *
5158
b3ccd1947786 Simplified and improved the process of creating a texture from a surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5157
diff changeset
   251
 *  \return The created texture is returned, or 0 on error.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   252
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   253
 *  \note The surface is not modified or freed by this function.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   254
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   255
 *  \sa SDL_QueryTexture()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   256
 *  \sa SDL_DestroyTexture()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   257
 */
5158
b3ccd1947786 Simplified and improved the process of creating a texture from a surface.
Sam Lantinga <slouken@libsdl.org>
parents: 5157
diff changeset
   258
extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   259
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   260
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   261
 *  \brief Query the attributes of a texture
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   262
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   263
 *  \param texture A texture to be queried.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   264
 *  \param format  A pointer filled in with the raw format of the texture.  The
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   265
 *                 actual format may differ, but pixel transfers will use this
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   266
 *                 format.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   267
 *  \param access  A pointer filled in with the actual access to the texture.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   268
 *  \param w       A pointer filled in with the width of the texture in pixels.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   269
 *  \param h       A pointer filled in with the height of the texture in pixels.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   270
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   271
 *  \return 0 on success, or -1 if the texture is not valid.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   272
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   273
extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   274
                                             Uint32 * format, int *access,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   275
                                             int *w, int *h);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   276
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   277
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   278
 *  \brief Set an additional color value used in render copy operations.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   279
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   280
 *  \param texture The texture to update.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   281
 *  \param r       The red color value multiplied into copy operations.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   282
 *  \param g       The green color value multiplied into copy operations.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   283
 *  \param b       The blue color value multiplied into copy operations.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   284
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   285
 *  \return 0 on success, or -1 if the texture is not valid or color modulation
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   286
 *          is not supported.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   287
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   288
 *  \sa SDL_GetTextureColorMod()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   289
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   290
extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   291
                                                   Uint8 r, Uint8 g, Uint8 b);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   292
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   293
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   294
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   295
 *  \brief Get the additional color value used in render copy operations.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   296
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   297
 *  \param texture The texture to query.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   298
 *  \param r         A pointer filled in with the current red color value.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   299
 *  \param g         A pointer filled in with the current green color value.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   300
 *  \param b         A pointer filled in with the current blue color value.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   301
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   302
 *  \return 0 on success, or -1 if the texture is not valid.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   303
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   304
 *  \sa SDL_SetTextureColorMod()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   305
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   306
extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   307
                                                   Uint8 * r, Uint8 * g,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   308
                                                   Uint8 * b);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   309
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   310
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   311
 *  \brief Set an additional alpha value used in render copy operations.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   312
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   313
 *  \param texture The texture to update.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   314
 *  \param alpha     The alpha value multiplied into copy operations.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   315
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   316
 *  \return 0 on success, or -1 if the texture is not valid or alpha modulation
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   317
 *          is not supported.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   318
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   319
 *  \sa SDL_GetTextureAlphaMod()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   320
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   321
extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   322
                                                   Uint8 alpha);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   323
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   324
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   325
 *  \brief Get the additional alpha value used in render copy operations.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   326
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   327
 *  \param texture The texture to query.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   328
 *  \param alpha     A pointer filled in with the current alpha value.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   329
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   330
 *  \return 0 on success, or -1 if the texture is not valid.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   331
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   332
 *  \sa SDL_SetTextureAlphaMod()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   333
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   334
extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   335
                                                   Uint8 * alpha);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   336
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   337
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   338
 *  \brief Set the blend mode used for texture copy operations.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   339
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   340
 *  \param texture The texture to update.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   341
 *  \param blendMode ::SDL_BlendMode to use for texture blending.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   342
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   343
 *  \return 0 on success, or -1 if the texture is not valid or the blend mode is
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   344
 *          not supported.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   345
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   346
 *  \note If the blend mode is not supported, the closest supported mode is
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   347
 *        chosen.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   348
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   349
 *  \sa SDL_GetTextureBlendMode()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   350
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   351
extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   352
                                                    SDL_BlendMode blendMode);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   353
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   354
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   355
 *  \brief Get the blend mode used for texture copy operations.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   356
 *
5156
307ccc9c135e Made it possible to create a texture of any format, even if not supported by the renderer.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   357
 *  \param texture   The texture to query.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   358
 *  \param blendMode A pointer filled in with the current blend mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   359
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   360
 *  \return 0 on success, or -1 if the texture is not valid.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   361
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   362
 *  \sa SDL_SetTextureBlendMode()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   363
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   364
extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   365
                                                    SDL_BlendMode *blendMode);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   366
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   367
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   368
 *  \brief Update the given texture rectangle with new pixel data.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   369
 *
5156
307ccc9c135e Made it possible to create a texture of any format, even if not supported by the renderer.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   370
 *  \param texture   The texture to update
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   371
 *  \param rect      A pointer to the rectangle of pixels to update, or NULL to
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   372
 *                   update the entire texture.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   373
 *  \param pixels    The raw pixel data.
9248
dabd5df43970 Improved the pitch variable description
Sam Lantinga <slouken@libsdl.org>
parents: 9199
diff changeset
   374
 *  \param pitch     The number of bytes in a row of pixel data, including padding between lines.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   375
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   376
 *  \return 0 on success, or -1 if the texture is not valid.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   377
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   378
 *  \note This is a fairly slow function.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   379
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   380
extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   381
                                              const SDL_Rect * rect,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   382
                                              const void *pixels, int pitch);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   383
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   384
/**
7759
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   385
 *  \brief Update a rectangle within a planar YV12 or IYUV texture with new pixel data.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   386
 *
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   387
 *  \param texture   The texture to update
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   388
 *  \param rect      A pointer to the rectangle of pixels to update, or NULL to
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   389
 *                   update the entire texture.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   390
 *  \param Yplane    The raw pixel data for the Y plane.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   391
 *  \param Ypitch    The number of bytes between rows of pixel data for the Y plane.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   392
 *  \param Uplane    The raw pixel data for the U plane.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   393
 *  \param Upitch    The number of bytes between rows of pixel data for the U plane.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   394
 *  \param Vplane    The raw pixel data for the V plane.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   395
 *  \param Vpitch    The number of bytes between rows of pixel data for the V plane.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   396
 *
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   397
 *  \return 0 on success, or -1 if the texture is not valid.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   398
 *
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   399
 *  \note You can use SDL_UpdateTexture() as long as your pixel data is
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   400
 *        a contiguous block of Y and U/V planes in the proper order, but
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   401
 *        this function is available if your pixel data is not contiguous.
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   402
 */
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   403
extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   404
                                                 const SDL_Rect * rect,
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   405
                                                 const Uint8 *Yplane, int Ypitch,
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   406
                                                 const Uint8 *Uplane, int Upitch,
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   407
                                                 const Uint8 *Vplane, int Vpitch);
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   408
869583422e5a Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
Sam Lantinga <slouken@libsdl.org>
parents: 7542
diff changeset
   409
/**
6493
6801ced90deb Made it clear that locking a streaming texture is a write-only operation.
Sam Lantinga <slouken@libsdl.org>
parents: 6414
diff changeset
   410
 *  \brief Lock a portion of the texture for write-only pixel access.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   411
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   412
 *  \param texture   The texture to lock for access, which was created with
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   413
 *                   ::SDL_TEXTUREACCESS_STREAMING.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   414
 *  \param rect      A pointer to the rectangle to lock for access. If the rect
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   415
 *                   is NULL, the entire texture will be locked.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   416
 *  \param pixels    This is filled in with a pointer to the locked pixels,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   417
 *                   appropriately offset by the locked area.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   418
 *  \param pitch     This is filled in with the pitch of the locked pixels.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   419
 *
5156
307ccc9c135e Made it possible to create a texture of any format, even if not supported by the renderer.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   420
 *  \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   421
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   422
 *  \sa SDL_UnlockTexture()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   423
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   424
extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   425
                                            const SDL_Rect * rect,
5156
307ccc9c135e Made it possible to create a texture of any format, even if not supported by the renderer.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   426
                                            void **pixels, int *pitch);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   427
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   428
/**
5156
307ccc9c135e Made it possible to create a texture of any format, even if not supported by the renderer.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   429
 *  \brief Unlock a texture, uploading the changes to video memory, if needed.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   430
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   431
 *  \sa SDL_LockTexture()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   432
 */
5156
307ccc9c135e Made it possible to create a texture of any format, even if not supported by the renderer.
Sam Lantinga <slouken@libsdl.org>
parents: 5149
diff changeset
   433
extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   434
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   435
/**
6247
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   436
 * \brief Determines whether a window supports the use of render targets
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   437
 *
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   438
 * \param renderer The renderer that will be checked
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   439
 *
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   440
 * \return SDL_TRUE if supported, SDL_FALSE if not.
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   441
 */
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   442
extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   443
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   444
/**
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   445
 * \brief Set a texture as the current rendering target.
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   446
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   447
 * \param renderer The renderer.
6248
7fe4b2b78acc You need to create the texture with the SDL_TEXTUREACCESS_TARGET flag.
Sam Lantinga <slouken@libsdl.org>
parents: 6247
diff changeset
   448
 * \param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target
6247
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   449
 *
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   450
 * \return 0 on success, or -1 on error
6578
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   451
 *
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   452
 *  \sa SDL_GetRenderTarget()
6247
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   453
 */
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   454
extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   455
                                                SDL_Texture *texture);
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   456
b6212690f78d Renamed SetTargetTexture() to SetRenderTarget()
Sam Lantinga <slouken@libsdl.org>
parents: 6237
diff changeset
   457
/**
6578
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   458
 * \brief Get the current render target or NULL for the default render target.
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   459
 *
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   460
 * \return The current render target
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   461
 *
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   462
 *  \sa SDL_SetRenderTarget()
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   463
 */
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   464
extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   465
77d70ec131bc Added SDL_GetRenderTarget() API function
Sam Lantinga <slouken@libsdl.org>
parents: 6530
diff changeset
   466
/**
6530
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   467
 *  \brief Set device independent resolution for rendering
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   468
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   469
 *  \param renderer The renderer for which resolution should be set.
6530
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   470
 *  \param w      The width of the logical resolution
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   471
 *  \param h      The height of the logical resolution
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   472
 *
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   473
 *  This function uses the viewport and scaling functionality to allow a fixed logical
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   474
 *  resolution for rendering, regardless of the actual output resolution.  If the actual
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   475
 *  output resolution doesn't have the same aspect ratio the output rendering will be
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   476
 *  centered within the output display.
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   477
 *
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   478
 *  If the output display is a window, mouse events in the window will be filtered
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   479
 *  and scaled so they seem to arrive within the logical resolution.
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   480
 *
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   481
 *  \note If this function results in scaling or subpixel drawing by the
6530
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   482
 *        rendering backend, it will be handled using the appropriate
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   483
 *        quality hints.
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   484
 *
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   485
 *  \sa SDL_RenderGetLogicalSize()
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   486
 *  \sa SDL_RenderSetScale()
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   487
 *  \sa SDL_RenderSetViewport()
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   488
 */
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   489
extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h);
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   490
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   491
/**
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   492
 *  \brief Get device independent resolution for rendering
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   493
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   494
 *  \param renderer The renderer from which resolution should be queried.
6530
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   495
 *  \param w      A pointer filled with the width of the logical resolution
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   496
 *  \param h      A pointer filled with the height of the logical resolution
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   497
 *
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   498
 *  \sa SDL_RenderSetLogicalSize()
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   499
 */
7175
45276691c8c8 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7168
diff changeset
   500
extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
6530
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   501
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   502
/**
5297
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   503
 *  \brief Set the drawing area for rendering on the current target.
5224
2178ffe17222 Added function SDL_RenderSetClipRect()
Sam Lantinga <slouken@libsdl.org>
parents: 5216
diff changeset
   504
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   505
 *  \param renderer The renderer for which the drawing area should be set.
5297
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   506
 *  \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   507
 *
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   508
 *  The x,y of the viewport rect represents the origin for rendering.
5224
2178ffe17222 Added function SDL_RenderSetClipRect()
Sam Lantinga <slouken@libsdl.org>
parents: 5216
diff changeset
   509
 *
7141
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   510
 *  \return 0 on success, or -1 on error
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   511
 *
7240
39eb4958950a When the window is resized, the viewport is automatically reset.
Sam Lantinga <slouken@libsdl.org>
parents: 7239
diff changeset
   512
 *  \note If the window associated with the renderer is resized, the viewport is automatically reset.
6530
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   513
 *
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   514
 *  \sa SDL_RenderGetViewport()
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   515
 *  \sa SDL_RenderSetLogicalSize()
5224
2178ffe17222 Added function SDL_RenderSetClipRect()
Sam Lantinga <slouken@libsdl.org>
parents: 5216
diff changeset
   516
 */
5297
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   517
extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   518
                                                  const SDL_Rect * rect);
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   519
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   520
/**
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   521
 *  \brief Get the drawing area for the current target.
6530
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   522
 *
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   523
 *  \sa SDL_RenderSetViewport()
5297
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   524
 */
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   525
extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   526
                                                   SDL_Rect * rect);
5224
2178ffe17222 Added function SDL_RenderSetClipRect()
Sam Lantinga <slouken@libsdl.org>
parents: 5216
diff changeset
   527
2178ffe17222 Added function SDL_RenderSetClipRect()
Sam Lantinga <slouken@libsdl.org>
parents: 5216
diff changeset
   528
/**
7141
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   529
 *  \brief Set the clip rectangle for the current target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   530
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   531
 *  \param renderer The renderer for which clip rectangle should be set.
7141
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   532
 *  \param rect   A pointer to the rectangle to set as the clip rectangle, or
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   533
 *                NULL to disable clipping.
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   534
 *
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   535
 *  \return 0 on success, or -1 on error
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   536
 *
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   537
 *  \sa SDL_RenderGetClipRect()
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   538
 */
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   539
extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   540
                                                  const SDL_Rect * rect);
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   541
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   542
/**
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   543
 *  \brief Get the clip rectangle for the current target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   544
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   545
 *  \param renderer The renderer from which clip rectangle should be queried.
7141
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   546
 *  \param rect   A pointer filled in with the current clip rectangle, or
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   547
 *                an empty rectangle if clipping is disabled.
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   548
 *
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   549
 *  \sa SDL_RenderSetClipRect()
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   550
 */
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   551
extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   552
                                                   SDL_Rect * rect);
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   553
e276777b4247 First pass on SDL render clip rect functionality
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
   554
/**
9199
9418826f6341 Fixed two typos in header file comment.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 8728
diff changeset
   555
 *  \brief Get whether clipping is enabled on the given renderer.
8728
c7174f961388 Render: Allow empty cliprect.
Jørgen P. Tjernø <jorgenpt@gmail.com>
parents: 8149
diff changeset
   556
 *
c7174f961388 Render: Allow empty cliprect.
Jørgen P. Tjernø <jorgenpt@gmail.com>
parents: 8149
diff changeset
   557
 *  \param renderer The renderer from which clip state should be queried.
c7174f961388 Render: Allow empty cliprect.
Jørgen P. Tjernø <jorgenpt@gmail.com>
parents: 8149
diff changeset
   558
 *
c7174f961388 Render: Allow empty cliprect.
Jørgen P. Tjernø <jorgenpt@gmail.com>
parents: 8149
diff changeset
   559
 *  \sa SDL_RenderGetClipRect()
c7174f961388 Render: Allow empty cliprect.
Jørgen P. Tjernø <jorgenpt@gmail.com>
parents: 8149
diff changeset
   560
 */
c7174f961388 Render: Allow empty cliprect.
Jørgen P. Tjernø <jorgenpt@gmail.com>
parents: 8149
diff changeset
   561
extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer);
c7174f961388 Render: Allow empty cliprect.
Jørgen P. Tjernø <jorgenpt@gmail.com>
parents: 8149
diff changeset
   562
c7174f961388 Render: Allow empty cliprect.
Jørgen P. Tjernø <jorgenpt@gmail.com>
parents: 8149
diff changeset
   563
c7174f961388 Render: Allow empty cliprect.
Jørgen P. Tjernø <jorgenpt@gmail.com>
parents: 8149
diff changeset
   564
/**
6528
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   565
 *  \brief Set the drawing scale for rendering on the current target.
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   566
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   567
 *  \param renderer The renderer for which the drawing scale should be set.
6528
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   568
 *  \param scaleX The horizontal scaling factor
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   569
 *  \param scaleY The vertical scaling factor
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   570
 *
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   571
 *  The drawing coordinates are scaled by the x/y scaling factors
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   572
 *  before they are used by the renderer.  This allows resolution
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   573
 *  independent drawing with a single coordinate system.
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   574
 *
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   575
 *  \note If this results in scaling or subpixel drawing by the
6528
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   576
 *        rendering backend, it will be handled using the appropriate
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   577
 *        quality hints.  For best results use integer scaling factors.
6530
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   578
 *
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   579
 *  \sa SDL_RenderGetScale()
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   580
 *  \sa SDL_RenderSetLogicalSize()
6528
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   581
 */
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   582
extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   583
                                               float scaleX, float scaleY);
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   584
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   585
/**
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   586
 *  \brief Get the drawing scale for the current target.
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   587
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   588
 *  \param renderer The renderer from which drawing scale should be queried.
6528
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   589
 *  \param scaleX A pointer filled in with the horizontal scaling factor
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   590
 *  \param scaleY A pointer filled in with the vertical scaling factor
6530
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   591
 *
ba5de88eab60 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize()
Sam Lantinga <slouken@libsdl.org>
parents: 6528
diff changeset
   592
 *  \sa SDL_RenderSetScale()
6528
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   593
 */
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   594
extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   595
                                               float *scaleX, float *scaleY);
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   596
e978048ced60 Added SDL_RenderSetScale() and SDL_RenderGetScale()
Sam Lantinga <slouken@libsdl.org>
parents: 6493
diff changeset
   597
/**
6039
85afb0c1dd04 The draw color affects RenderClear() as well. (thanks to the feedback form to whoever pointed this out)
Sam Lantinga <slouken@libsdl.org>
parents: 5535
diff changeset
   598
 *  \brief Set the color used for drawing operations (Rect, Line and Clear).
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   599
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   600
 *  \param renderer The renderer for which drawing color should be set.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   601
 *  \param r The red value used to draw on the rendering target.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   602
 *  \param g The green value used to draw on the rendering target.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   603
 *  \param b The blue value used to draw on the rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   604
 *  \param a The alpha value used to draw on the rendering target, usually
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   605
 *           ::SDL_ALPHA_OPAQUE (255).
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   606
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   607
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   608
 */
8028
e3e00f8e6b91 Fixed a few public APIs that we accidentally neglected to mark as SDLCALL.
Ryan C. Gordon <icculus@icculus.org>
parents: 7759
diff changeset
   609
extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   610
                                           Uint8 r, Uint8 g, Uint8 b,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   611
                                           Uint8 a);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   612
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   613
/**
6039
85afb0c1dd04 The draw color affects RenderClear() as well. (thanks to the feedback form to whoever pointed this out)
Sam Lantinga <slouken@libsdl.org>
parents: 5535
diff changeset
   614
 *  \brief Get the color used for drawing operations (Rect, Line and Clear).
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   615
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   616
 *  \param renderer The renderer from which drawing color should be queried.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   617
 *  \param r A pointer to the red value used to draw on the rendering target.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   618
 *  \param g A pointer to the green value used to draw on the rendering target.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   619
 *  \param b A pointer to the blue value used to draw on the rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   620
 *  \param a A pointer to the alpha value used to draw on the rendering target,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   621
 *           usually ::SDL_ALPHA_OPAQUE (255).
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   622
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   623
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   624
 */
8028
e3e00f8e6b91 Fixed a few public APIs that we accidentally neglected to mark as SDLCALL.
Ryan C. Gordon <icculus@icculus.org>
parents: 7759
diff changeset
   625
extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   626
                                           Uint8 * r, Uint8 * g, Uint8 * b,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   627
                                           Uint8 * a);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   628
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   629
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   630
 *  \brief Set the blend mode used for drawing operations (Fill and Line).
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   631
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   632
 *  \param renderer The renderer for which blend mode should be set.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   633
 *  \param blendMode ::SDL_BlendMode to use for blending.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   634
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   635
 *  \return 0 on success, or -1 on error
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   636
 *
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   637
 *  \note If the blend mode is not supported, the closest supported mode is
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   638
 *        chosen.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   639
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   640
 *  \sa SDL_GetRenderDrawBlendMode()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   641
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   642
extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   643
                                                       SDL_BlendMode blendMode);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   644
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   645
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   646
 *  \brief Get the blend mode used for drawing operations.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   647
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   648
 *  \param renderer The renderer from which blend mode should be queried.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   649
 *  \param blendMode A pointer filled in with the current blend mode.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   650
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   651
 *  \return 0 on success, or -1 on error
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   652
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   653
 *  \sa SDL_SetRenderDrawBlendMode()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   654
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   655
extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   656
                                                       SDL_BlendMode *blendMode);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   657
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   658
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   659
 *  \brief Clear the current rendering target with the drawing color
5297
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   660
 *
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   661
 *  This function clears the entire rendering target, ignoring the viewport.
7168
b9070b2e868a Fixed bug 1843 - SDL_RenderClear prototype doxygen missing
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7141
diff changeset
   662
 *
b9070b2e868a Fixed bug 1843 - SDL_RenderClear prototype doxygen missing
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7141
diff changeset
   663
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   664
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   665
extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   666
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   667
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   668
 *  \brief Draw a point on the current rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   669
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   670
 *  \param renderer The renderer which should draw a point.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   671
 *  \param x The x coordinate of the point.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   672
 *  \param y The y coordinate of the point.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   673
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   674
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   675
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   676
extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   677
                                                int x, int y);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   678
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   679
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   680
 *  \brief Draw multiple points on the current rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   681
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   682
 *  \param renderer The renderer which should draw multiple points.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   683
 *  \param points The points to draw
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   684
 *  \param count The number of points to draw
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   685
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   686
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   687
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   688
extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   689
                                                 const SDL_Point * points,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   690
                                                 int count);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   691
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   692
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   693
 *  \brief Draw a line on the current rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   694
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   695
 *  \param renderer The renderer which should draw a line.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   696
 *  \param x1 The x coordinate of the start point.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   697
 *  \param y1 The y coordinate of the start point.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   698
 *  \param x2 The x coordinate of the end point.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   699
 *  \param y2 The y coordinate of the end point.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   700
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   701
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   702
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   703
extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   704
                                               int x1, int y1, int x2, int y2);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   705
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   706
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   707
 *  \brief Draw a series of connected lines on the current rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   708
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   709
 *  \param renderer The renderer which should draw multiple lines.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   710
 *  \param points The points along the lines
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   711
 *  \param count The number of points, drawing count-1 lines
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   712
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   713
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   714
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   715
extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   716
                                                const SDL_Point * points,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   717
                                                int count);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   718
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   719
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   720
 *  \brief Draw a rectangle on the current rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   721
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   722
 *  \param renderer The renderer which should draw a rectangle.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   723
 *  \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   724
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   725
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   726
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   727
extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   728
                                               const SDL_Rect * rect);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   729
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   730
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   731
 *  \brief Draw some number of rectangles on the current rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   732
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   733
 *  \param renderer The renderer which should draw multiple rectangles.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   734
 *  \param rects A pointer to an array of destination rectangles.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   735
 *  \param count The number of rectangles.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   736
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   737
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   738
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   739
extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
5297
1800dc39b74c Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   740
                                                const SDL_Rect * rects,
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   741
                                                int count);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   742
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   743
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   744
 *  \brief Fill a rectangle on the current rendering target with the drawing color.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   745
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   746
 *  \param renderer The renderer which should fill a rectangle.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   747
 *  \param rect A pointer to the destination rectangle, or NULL for the entire
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   748
 *              rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   749
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   750
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   751
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   752
extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   753
                                               const SDL_Rect * rect);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   754
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   755
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   756
 *  \brief Fill some number of rectangles on the current rendering target with the drawing color.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   757
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   758
 *  \param renderer The renderer which should fill multiple rectangles.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   759
 *  \param rects A pointer to an array of destination rectangles.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   760
 *  \param count The number of rectangles.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   761
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   762
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   763
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   764
extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
5486
a036736283ef Fixed typo
Sam Lantinga <slouken@libsdl.org>
parents: 5344
diff changeset
   765
                                                const SDL_Rect * rects,
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   766
                                                int count);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   767
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   768
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   769
 *  \brief Copy a portion of the texture to the current rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   770
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   771
 *  \param renderer The renderer which should copy parts of a texture.
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   772
 *  \param texture The source texture.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   773
 *  \param srcrect   A pointer to the source rectangle, or NULL for the entire
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   774
 *                   texture.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   775
 *  \param dstrect   A pointer to the destination rectangle, or NULL for the
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   776
 *                   entire rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   777
 *
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   778
 *  \return 0 on success, or -1 on error
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   779
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   780
extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   781
                                           SDL_Texture * texture,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   782
                                           const SDL_Rect * srcrect,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   783
                                           const SDL_Rect * dstrect);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   784
6320
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   785
/**
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   786
 *  \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
6320
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   787
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   788
 *  \param renderer The renderer which should copy parts of a texture.
6320
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   789
 *  \param texture The source texture.
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   790
 *  \param srcrect   A pointer to the source rectangle, or NULL for the entire
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   791
 *                   texture.
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   792
 *  \param dstrect   A pointer to the destination rectangle, or NULL for the
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   793
 *                   entire rendering target.
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   794
 *  \param angle    An angle in degrees that indicates the rotation that will be applied to dstrect
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   795
 *  \param center   A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done aroud dstrect.w/2, dstrect.h/2)
6826
7fd31621ce9c Fixed typo in documentation
Sam Lantinga <slouken@libsdl.org>
parents: 6578
diff changeset
   796
 *  \param flip     An SDL_RendererFlip value stating which flipping actions should be performed on the texture
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   797
 *
6320
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   798
 *  \return 0 on success, or -1 on error
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   799
 */
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   800
extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   801
                                           SDL_Texture * texture,
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   802
                                           const SDL_Rect * srcrect,
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   803
                                           const SDL_Rect * dstrect,
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   804
                                           const double angle,
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   805
                                           const SDL_Point *center,
6077a1310907 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6258
diff changeset
   806
                                           const SDL_RendererFlip flip);
6232
37e8d0736366 Implementation of render targets, by Mason Wheeler and Gabriel Jacobo
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   807
37e8d0736366 Implementation of render targets, by Mason Wheeler and Gabriel Jacobo
Sam Lantinga <slouken@libsdl.org>
parents: 6138
diff changeset
   808
/**
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   809
 *  \brief Read pixels from the current rendering target.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   810
 *
7188
20bd120bf7e4 Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents: 7175
diff changeset
   811
 *  \param renderer The renderer from which pixels should be read.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   812
 *  \param rect   A pointer to the rectangle to read, or NULL for the entire
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   813
 *                render target.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   814
 *  \param format The desired format of the pixel data, or 0 to use the format
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   815
 *                of the rendering target
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   816
 *  \param pixels A pointer to be filled in with the pixel data
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   817
 *  \param pitch  The pitch of the pixels parameter.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   818
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   819
 *  \return 0 on success, or -1 if pixel reading is not supported.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   820
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   821
 *  \warning This is a very slow operation, and should not be used frequently.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   822
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   823
extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   824
                                                 const SDL_Rect * rect,
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   825
                                                 Uint32 format,
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   826
                                                 void *pixels, int pitch);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   827
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   828
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   829
 *  \brief Update the screen with rendering performed.
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   830
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   831
extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   832
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   833
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   834
 *  \brief Destroy the specified texture.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   835
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   836
 *  \sa SDL_CreateTexture()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   837
 *  \sa SDL_CreateTextureFromSurface()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   838
 */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   839
extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   840
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   841
/**
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   842
 *  \brief Destroy the rendering context for a window and free associated
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   843
 *         textures.
7191
75360622e65f File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents: 7188
diff changeset
   844
 *
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   845
 *  \sa SDL_CreateRenderer()
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   846
 */
5147
ad50b3db78bd The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future.
Sam Lantinga <slouken@libsdl.org>
parents: 5145
diff changeset
   847
extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   848
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   849
6414
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   850
/**
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   851
 *  \brief Bind the texture to the current OpenGL/ES/ES2 context for use with
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   852
 *         OpenGL instructions.
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   853
 *
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   854
 *  \param texture  The SDL texture to bind
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   855
 *  \param texw     A pointer to a float that will be filled with the texture width
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   856
 *  \param texh     A pointer to a float that will be filled with the texture height
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   857
 *
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   858
 *  \return 0 on success, or -1 if the operation is not supported
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   859
 */
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   860
extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   861
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   862
/**
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   863
 *  \brief Unbind a texture from the current OpenGL/ES/ES2 context.
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   864
 *
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   865
 *  \param texture  The SDL texture to unbind
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   866
 *
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   867
 *  \return 0 on success, or -1 if the operation is not supported
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   868
 */
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   869
extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   870
df50b0d6c1c3 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576)
Gabriel Jacobo <gabomdq@gmail.com>
parents: 6320
diff changeset
   871
5145
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   872
/* Ends C function definitions when using C++ */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   873
#ifdef __cplusplus
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   874
}
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   875
#endif
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   876
#include "close_code.h"
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   877
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   878
#endif /* _SDL_render_h */
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   879
2f44e6969a59 Split the rendering API out into a separate header file.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   880
/* vi: set ts=4 sw=4 expandtab: */