Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
615 lines (557 loc) · 21.8 KB

SDL_render.h

File metadata and controls

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