annotate include/SDL_render.h @ 5148:2f44e6969a59

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