1 //from "sdl_renderer.h"
4 * Flags used when creating a rendering context
7 SDL_RENDERER_SOFTWARE = $00000001; {**< The renderer is a software fallback *}
8 SDL_RENDERER_ACCELERATED = $00000002; {**< The renderer uses hardware
10 SDL_RENDERER_PRESENTVSYNC = $00000004; {**< Present is synchronized
11 with the refresh rate *}
12 SDL_RENDERER_TARGETTEXTURE = $00000008; {**< The renderer supports
13 rendering to texture *}
16 PSDL_RendererFlags = ^TSDL_RendererFlags;
17 TSDL_RendererFlags = Word;
20 * Information on the capabilities of a render driver or context.
22 PSDL_RendererInfo = ^TSDL_RendererInfo;
23 TSDL_RendererInfo = record
24 name: PAnsiChar; {**< The name of the renderer *}
25 flags: UInt32; {**< Supported ::SDL_RendererFlags *}
26 num_texture_formats: UInt32; {**< The number of available texture formats *}
27 texture_formats: array[0..15] of UInt32; {**< The available texture formats *}
28 max_texture_width: SInt32; {**< The maximimum texture width *}
29 max_texture_height: SInt32; {**< The maximimum texture height *}
33 * The access pattern allowed for a texture.
36 PSDL_TextureAccess = ^TSDL_TextureAccess;
37 TSDL_TextureAccess = (
38 SDL_TEXTUREACCESS_STATIC, {**< Changes rarely, not lockable *}
39 SDL_TEXTUREACCESS_STREAMING, {**< Changes frequently, lockable *}
40 SDL_TEXTUREACCESS_TARGET {**< Texture can be used as a render target *}
44 * The texture channel modulation used in SDL_RenderCopy().
46 PSDL_TextureModulate = ^TSDL_TextureModulate;
47 TSDL_TextureModulate = (
48 SDL_TEXTUREMODULATE_NONE, {**< No modulation *}
49 SDL_TEXTUREMODULATE_COLOR, {**< srcC = srcC * color *}
50 SDL_TEXTUREMODULATE_ALPHA {**< srcA = srcA * alpha *}
54 * Flip constants for SDL_RenderCopyEx
57 PSDL_RendererFlip = ^TSDL_RendererFlip;
58 TSDL_RendererFlip = (SDL_FLIP_NONE, {**< Do not flip *}
59 SDL_FLIP_HORIZONTAL, {**< flip horizontally *}
60 SDL_FLIP_VERTICAL {**< flip vertically *}
64 * A structure representing rendering state
67 PPSDL_Renderer = ^PSDL_Renderer;
68 PSDL_Renderer = Pointer; //todo!
71 * An efficient driver-specific representation of pixel data
73 PSDL_Texture = Pointer; //todo!
75 {* Function prototypes *}
78 * Get the number of 2D rendering drivers available for the current
81 * A render driver is a set of code that handles rendering and texture
82 * management on a particular display. Normally there is only one, but
83 * some drivers may have several available with different capabilities.
85 * SDL_GetRenderDriverInfo()
86 * SDL_CreateRenderer()
88 function SDL_GetNumRenderDrivers: SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumRenderDrivers' {$ENDIF} {$ENDIF};
91 * Get information about a specific 2D rendering driver for the current
94 * index The index of the driver to query information about.
95 * info A pointer to an SDL_RendererInfo struct to be filled with
96 * information on the rendering driver.
98 * 0 on success, -1 if the index was out of range.
100 * SDL_CreateRenderer()
102 function SDL_GetRenderDriverInfo(index: SInt32; info: PSDL_RendererInfo): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderDriverInfo' {$ENDIF} {$ENDIF};
105 * Create a window and default renderer
107 * width The width of the window
108 * height The height of the window
109 * window_flags The flags used to create the window
110 * window A pointer filled with the window, or NULL on error
111 * renderer A pointer filled with the renderer, or NULL on error
113 * 0 on success, or -1 on error
115 function SDL_CreateWindowAndRenderer(width: SInt32; height: SInt32; window_flags: UInt32; window: PPSDL_Window; renderer: PPSDL_Renderer): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateWindowAndRenderer' {$ENDIF} {$ENDIF};
118 * Create a 2D rendering context for a window.
120 * window The window where rendering is displayed.
121 * index The index of the rendering driver to initialize, or -1 to
122 * initialize the first one supporting the requested flags.
123 * flags ::SDL_RendererFlags.
125 * A valid rendering context or NULL if there was an error.
127 * SDL_CreateSoftwareRenderer()
128 * SDL_GetRendererInfo()
129 * SDL_DestroyRenderer()
131 function SDL_CreateRenderer(window: PSDL_Window; index: SInt32; flags: UInt32): PSDL_Renderer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRenderer' {$ENDIF} {$ENDIF};
134 * Create a 2D software rendering context for a surface.
136 * surface The surface where rendering is done.
138 * A valid rendering context or NULL if there was an error.
140 * SDL_CreateRenderer()
141 * SDL_DestroyRenderer()
143 function SDL_CreateSoftwareRenderer(surface: PSDL_Surface): PSDL_Renderer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateSoftwareRenderer' {$ENDIF} {$ENDIF};
146 * Get the renderer associated with a window.
148 function SDL_GetRenderer(window: PSDL_Window): PSDL_Renderer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderer' {$ENDIF} {$ENDIF};
151 * Get information about a rendering context.
153 function SDL_GetRendererInfo(renderer: PSDL_Renderer; info: PSDL_RendererInfo): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRendererInfo' {$ENDIF} {$ENDIF};
156 * Get the output size of a rendering context.
158 function SDL_GetRendererOutputSize(renderer: PSDL_Renderer; w: PInt; h: PInt): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRendererOutputSize' {$ENDIF} {$ENDIF};
161 * Create a texture for a rendering context.
163 * renderer The renderer.
164 * format The format of the texture.
165 * access One of the enumerated values in ::SDL_TextureAccess.
166 * w The width of the texture in pixels.
167 * h The height of the texture in pixels.
169 * The created texture is returned, or 0 if no rendering context was
170 * active, the format was unsupported, or the width or height were out
174 * SDL_UpdateTexture()
175 * SDL_DestroyTexture()
177 function SDL_CreateTexture(renderer: PSDL_Renderer; format: UInt32; access: SInt32; w: SInt32; h: SInt32): PSDL_Texture cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateTexture' {$ENDIF} {$ENDIF};
180 * Create a texture from an existing surface.
182 * renderer The renderer.
183 * surface The surface containing pixel data used to fill the texture.
185 * The created texture is returned, or 0 on error.
187 * The surface is not modified or freed by this function.
190 * SDL_DestroyTexture()
192 function SDL_CreateTextureFromSurface(renderer: PSDL_Renderer; surface: PSDL_Surface): PSDL_Texture cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateTextureFromSurface' {$ENDIF} {$ENDIF};
195 * Query the attributes of a texture
197 * texture A texture to be queried.
198 * format A pointer filled in with the raw format of the texture. The
199 * actual format may differ, but pixel transfers will use this
201 * access A pointer filled in with the actual access to the texture.
202 * w A pointer filled in with the width of the texture in pixels.
203 * h A pointer filled in with the height of the texture in pixels.
205 * 0 on success, or -1 if the texture is not valid.
207 function SDL_QueryTexture(texture: PSDL_Texture; format: PUInt32; access: PInt; w: PInt; h: PInt): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QueryTexture' {$ENDIF} {$ENDIF};
210 * Set an additional color value used in render copy operations.
212 * texture The texture to update.
213 * r The red color value multiplied into copy operations.
214 * g The green color value multiplied into copy operations.
215 * b The blue color value multiplied into copy operations.
217 * 0 on success, or -1 if the texture is not valid or color modulation
220 * SDL_GetTextureColorMod()
222 function SDL_SetTextureColorMod(texture: PSDL_Texture; r: UInt8; g: UInt8; b: UInt8): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureColorMod' {$ENDIF} {$ENDIF};
225 * Get the additional color value used in render copy operations.
227 * texture The texture to query.
228 * r A pointer filled in with the current red color value.
229 * g A pointer filled in with the current green color value.
230 * b A pointer filled in with the current blue color value.
232 * 0 on success, or -1 if the texture is not valid.
234 * SDL_SetTextureColorMod()
236 function SDL_GetTextureColorMod(texture: PSDL_Texture; r: PUInt8; g: PUInt8; b: PUInt8): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureColorMod' {$ENDIF} {$ENDIF};
239 * Set an additional alpha value used in render copy operations.
241 * texture The texture to update.
242 * alpha The alpha value multiplied into copy operations.
244 * 0 on success, or -1 if the texture is not valid or alpha modulation
247 * SDL_GetTextureAlphaMod()
249 function SDL_SetTextureAlphaMod(texture: PSDL_Texture; alpha: UInt8): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureAlphaMod' {$ENDIF} {$ENDIF};
252 * Get the additional alpha value used in render copy operations.
254 * texture The texture to query.
255 * alpha A pointer filled in with the current alpha value.
257 * 0 on success, or -1 if the texture is not valid.
259 * SDL_SetTextureAlphaMod()
261 function SDL_GetTextureAlphaMod(texture: PSDL_Texture; alpha: PUInt8): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureAlphaMod' {$ENDIF} {$ENDIF};
264 * Set the blend mode used for texture copy operations.
266 * texture The texture to update.
267 * blendMode ::SDL_BlendMode to use for texture blending.
269 * 0 on success, or -1 if the texture is not valid or the blend mode is
272 * If the blend mode is not supported, the closest supported mode is
275 * SDL_GetTextureBlendMode()
277 function SDL_SetTextureBlendMode(texture: PSDL_Texture; blendMode: TSDL_BlendMode): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureBlendMode' {$ENDIF} {$ENDIF};
280 * Get the blend mode used for texture copy operations.
282 * texture The texture to query.
283 * blendMode A pointer filled in with the current blend mode.
285 * 0 on success, or -1 if the texture is not valid.
287 * SDL_SetTextureBlendMode()
289 function SDL_GetTextureBlendMode(texture: PSDL_Texture; blendMode: PSDL_BlendMode): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureBlendMode' {$ENDIF} {$ENDIF};
292 * Update the given texture rectangle with new pixel data.
294 * texture The texture to update
295 * rect A pointer to the rectangle of pixels to update, or NULL to
296 * update the entire texture.
297 * pixels The raw pixel data.
298 * pitch The number of bytes between rows of pixel data.
300 * 0 on success, or -1 if the texture is not valid.
302 * This is a fairly slow function.
304 function SDL_UpdateTexture(texture: PSDL_Texture; rect: PSDL_Rect; pixels: Pointer; pitch: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateTexture' {$ENDIF} {$ENDIF};
307 * Lock a portion of the texture for write-only pixel access.
309 * texture The texture to lock for access, which was created with
310 * SDL_TEXTUREACCESS_STREAMING.
311 * rect A pointer to the rectangle to lock for access. If the rect
312 * is NULL, the entire texture will be locked.
313 * pixels This is filled in with a pointer to the locked pixels,
314 * appropriately offset by the locked area.
315 * pitch This is filled in with the pitch of the locked pixels.
317 * 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.
319 * SDL_UnlockTexture()
321 function SDL_LockTexture(texture: PSDL_Texture; rect: PSDL_Rect; pixels: PPointer; pitch: PInt): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockTexture' {$ENDIF} {$ENDIF};
324 * Unlock a texture, uploading the changes to video memory, if needed.
328 procedure SDL_UnlockTexture(texture: PSDL_Texture) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockTexture' {$ENDIF} {$ENDIF};
331 * Determines whether a window supports the use of render targets
333 * renderer The renderer that will be checked
335 * SDL_TRUE if supported, SDL_FALSE if not.
337 function SDL_RenderTargetSupported(renderer: PSDL_Renderer): Boolean cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderTargetSupported' {$ENDIF} {$ENDIF};
340 * Set a texture as the current rendering target.
342 * renderer The renderer.
343 * texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target
345 * 0 on success, or -1 on error
347 * SDL_GetRenderTarget()
349 function SDL_SetRenderTarget(renderer: PSDL_Renderer; texture: PSDL_Texture): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRenderTarget' {$ENDIF} {$ENDIF};
352 * Get the current render target or NULL for the default render target.
354 * The current render target
356 * SDL_SetRenderTarget()
358 function SDL_GetRenderTarget(renderer: PSDL_Renderer): PSDL_Texture cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderTarget' {$ENDIF} {$ENDIF};
361 * Set device independent resolution for rendering
363 * renderer The renderer for which resolution should be set.
364 * w The width of the logical resolution
365 * h The height of the logical resolution
367 * This function uses the viewport and scaling functionality to allow a fixed logical
368 * resolution for rendering, regardless of the actual output resolution. If the actual
369 * output resolution doesn't have the same aspect ratio the output rendering will be
370 * centered within the output display.
372 * If the output display is a window, mouse events in the window will be filtered
373 * and scaled so they seem to arrive within the logical resolution.
375 * If this function results in scaling or subpixel drawing by the
376 * rendering backend, it will be handled using the appropriate
379 * SDL_RenderGetLogicalSize()
380 * SDL_RenderSetScale()
381 * SDL_RenderSetViewport()
383 function SDL_RenderSetLogicalSize(renderer: PSDL_Renderer; w: SInt32; h: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetLogicalSize' {$ENDIF} {$ENDIF};
386 * Get device independent resolution for rendering
388 * renderer The renderer from which resolution should be queried.
389 * w A pointer filled with the width of the logical resolution
390 * h A pointer filled with the height of the logical resolution
392 * SDL_RenderSetLogicalSize()
394 procedure SDL_RenderGetLogicalSize(renderer: PSDL_Renderer; w: PInt; h: PInt) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetLogicalSize' {$ENDIF} {$ENDIF};
397 * Set the drawing area for rendering on the current target.
399 * renderer The renderer for which the drawing area should be set.
400 * rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.
402 * The x,y of the viewport rect represents the origin for rendering.
404 * 0 on success, or -1 on error
406 * If the window associated with the renderer is resized, the viewport is automatically reset.
408 * SDL_RenderGetViewport()
409 * SDL_RenderSetLogicalSize()
411 function SDL_RenderSetViewport(renderer: PSDL_Renderer; const rect: PSDL_Rect): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetViewport' {$ENDIF} {$ENDIF};
414 * Get the drawing area for the current target.
416 * SDL_RenderSetViewport()
418 procedure SDL_RenderGetViewport(renderer: PSDL_Renderer; rect: PSDL_Rect) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetViewport' {$ENDIF} {$ENDIF};
421 * Set the clip rectangle for the current target.
423 * renderer The renderer for which clip rectangle should be set.
424 * rect A pointer to the rectangle to set as the clip rectangle, or
425 * NULL to disable clipping.
427 * 0 on success, or -1 on error
429 * SDL_RenderGetClipRect()
431 function SDL_RenderSetClipRect(renderer: PSDL_Renderer; rect: PSDL_Rect): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetClipRect' {$ENDIF} {$ENDIF};
434 * Get the clip rectangle for the current target.
436 * renderer The renderer from which clip rectangle should be queried.
437 * rect A pointer filled in with the current clip rectangle, or
438 * an empty rectangle if clipping is disabled.
440 * SDL_RenderSetClipRect()
442 procedure SDL_RenderGetClipRect(renderer: PSDL_Renderer; rect: PSDL_Rect) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetClipRect' {$ENDIF} {$ENDIF};
445 * Set the drawing scale for rendering on the current target.
447 * renderer The renderer for which the drawing scale should be set.
448 * scaleX The horizontal scaling factor
449 * scaleY The vertical scaling factor
451 * The drawing coordinates are scaled by the x/y scaling factors
452 * before they are used by the renderer. This allows resolution
453 * independent drawing with a single coordinate system.
455 * If this results in scaling or subpixel drawing by the
456 * rendering backend, it will be handled using the appropriate
457 * quality hints. For best results use integer scaling factors.
459 * SDL_RenderGetScale()
460 * SDL_RenderSetLogicalSize()
462 function SDL_RenderSetScale(renderer: PSDL_Renderer; scaleX: Float; scaleY: Float): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetScale' {$ENDIF} {$ENDIF};
465 * Get the drawing scale for the current target.
467 * renderer The renderer from which drawing scale should be queried.
468 * scaleX A pointer filled in with the horizontal scaling factor
469 * scaleY A pointer filled in with the vertical scaling factor
471 * SDL_RenderSetScale()
473 procedure SDL_RenderGetScale(renderer: PSDL_Renderer; scaleX: PFloat; scaleY: PFloat) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetScale' {$ENDIF} {$ENDIF};
476 * Set the color used for drawing operations (Rect, Line and Clear).
478 * renderer The renderer for which drawing color should be set.
479 * r The red value used to draw on the rendering target.
480 * g The green value used to draw on the rendering target.
481 * b The blue value used to draw on the rendering target.
482 * a The alpha value used to draw on the rendering target, usually
483 * SDL_ALPHA_OPAQUE (255).
485 * 0 on success, or -1 on error
487 function SDL_SetRenderDrawColor(renderer: PSDL_Renderer; r: UInt8; g: UInt8; b: UInt8; a: UInt8): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRenderDrawColor' {$ENDIF} {$ENDIF};
490 * Get the color used for drawing operations (Rect, Line and Clear).
492 * renderer The renderer from which drawing color should be queried.
493 * r A pointer to the red value used to draw on the rendering target.
494 * g A pointer to the green value used to draw on the rendering target.
495 * b A pointer to the blue value used to draw on the rendering target.
496 * a A pointer to the alpha value used to draw on the rendering target,
497 * usually SDL_ALPHA_OPAQUE (255).
499 * 0 on success, or -1 on error
501 function SDL_GetRenderDrawColor(renderer: PSDL_Renderer; r: PUInt8; g: PUInt8; b: PUInt8; a: PUInt8): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderDrawColor' {$ENDIF} {$ENDIF};
504 * Set the blend mode used for drawing operations (Fill and Line).
506 * renderer The renderer for which blend mode should be set.
507 * blendMode SDL_BlendMode to use for blending.
509 * 0 on success, or -1 on error
511 * If the blend mode is not supported, the closest supported mode is
514 * SDL_GetRenderDrawBlendMode()
516 function SDL_SetRenderDrawBlendMode(renderer: PSDL_Renderer; blendMode: TSDL_BlendMode): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRenderDrawBlendMode' {$ENDIF} {$ENDIF};
519 * Get the blend mode used for drawing operations.
521 * renderer The renderer from which blend mode should be queried.
522 * blendMode A pointer filled in with the current blend mode.
524 * 0 on success, or -1 on error
526 * SDL_SetRenderDrawBlendMode()
528 function SDL_GetRenderDrawBlendMode(renderer: PSDL_Renderer; blendMode: PSDL_BlendMode): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderDrawBlendMode' {$ENDIF} {$ENDIF};
531 * Clear the current rendering target with the drawing color
533 * This function clears the entire rendering target, ignoring the viewport.
535 * 0 on success, or -1 on error
537 function SDL_RenderClear(renderer: PSDL_Renderer): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderClear' {$ENDIF} {$ENDIF};
540 * Draw a point on the current rendering target.
542 * renderer The renderer which should draw a point.
543 * x The x coordinate of the point.
544 * y The y coordinate of the point.
546 * 0 on success, or -1 on error
548 function SDL_RenderDrawPoint(renderer: PSDL_Renderer; x: SInt32; y: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPoint' {$ENDIF} {$ENDIF};
551 * Draw multiple points on the current rendering target.
553 * renderer The renderer which should draw multiple points.
554 * points The points to draw
555 * count The number of points to draw
557 * 0 on success, or -1 on error
559 function SDL_RenderDrawPoints(renderer: PSDL_Renderer; points: PSDL_Point; count: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPoints' {$ENDIF} {$ENDIF};
562 * Draw a line on the current rendering target.
564 * renderer The renderer which should draw a line.
565 * x1 The x coordinate of the start point.
566 * y1 The y coordinate of the start point.
567 * x2 The x coordinate of the end point.
568 * y2 The y coordinate of the end point.
570 * 0 on success, or -1 on error
572 function SDL_RenderDrawLine(renderer: PSDL_Renderer; x1: SInt32; y1: SInt32; x2: SInt32; y2: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLine' {$ENDIF} {$ENDIF};
575 * \brief Draw a series of connected lines on the current rendering target.
577 * \param renderer The renderer which should draw multiple lines.
578 * \param points The points along the lines
579 * \param count The number of points, drawing count-1 lines
581 * \return 0 on success, or -1 on error
583 function SDL_RenderDrawLines(renderer: PSDL_Renderer; points: PSDL_Point; count: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLines' {$ENDIF} {$ENDIF};
586 * Draw a rectangle on the current rendering target.
588 * renderer The renderer which should draw a rectangle.
589 * rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
591 * 0 on success, or -1 on error
593 function SDL_RenderDrawRect(renderer: PSDL_Renderer; rect: PSDL_Rect): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRect' {$ENDIF} {$ENDIF};
596 * Draw some number of rectangles on the current rendering target.
598 * renderer The renderer which should draw multiple rectangles.
599 * rects A pointer to an array of destination rectangles.
600 * count The number of rectangles.
602 * 0 on success, or -1 on error
604 function SDL_RenderDrawRects(renderer: PSDL_Renderer; rects: PSDL_Rect; count: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRects' {$ENDIF} {$ENDIF};
607 * Fill a rectangle on the current rendering target with the drawing color.
609 * renderer The renderer which should fill a rectangle.
610 * rect A pointer to the destination rectangle, or NULL for the entire
613 * 0 on success, or -1 on error
615 function SDL_RenderFillRect(renderer: PSDL_Renderer; rect: PSDL_Rect): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRect' {$ENDIF} {$ENDIF};
618 * Fill some number of rectangles on the current rendering target with the drawing color.
620 * renderer The renderer which should fill multiple rectangles.
621 * rects A pointer to an array of destination rectangles.
622 * count The number of rectangles.
624 * 0 on success, or -1 on error
626 function SDL_RenderFillRects(renderer: PSDL_Renderer; rects: PSDL_Rect; count: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRects' {$ENDIF} {$ENDIF};
629 * Copy a portion of the texture to the current rendering target.
631 * renderer The renderer which should copy parts of a texture.
632 * texture The source texture.
633 * srcrect A pointer to the source rectangle, or NULL for the entire
635 * dstrect A pointer to the destination rectangle, or NULL for the
636 * entire rendering target.
638 * 0 on success, or -1 on error
640 function SDL_RenderCopy(renderer: PSDL_Renderer; texture: PSDL_Texture; srcrect: PSDL_Rect; dstrect: PSDL_Rect): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopy' {$ENDIF} {$ENDIF};
643 * Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
645 * renderer The renderer which should copy parts of a texture.
646 * texture The source texture.
647 * srcrect A pointer to the source rectangle, or NULL for the entire
649 * dstrect A pointer to the destination rectangle, or NULL for the
650 * entire rendering target.
651 * angle An angle in degrees that indicates the rotation that will be applied to dstrect
652 * center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done aroud dstrect.w/2, dstrect.h/2)
653 * flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture
655 * 0 on success, or -1 on error
657 function SDL_RenderCopyEx(renderer: PSDL_Renderer; texture: PSDL_Texture; const srcrect: PSDL_Rect; dstrect: PSDL_Rect; angle: Double; center: PSDL_Point; flip: PSDL_RendererFlip): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyEx' {$ENDIF} {$ENDIF};
660 * Read pixels from the current rendering target.
662 * renderer The renderer from which pixels should be read.
663 * rect A pointer to the rectangle to read, or NULL for the entire
665 * format The desired format of the pixel data, or 0 to use the format
666 * of the rendering target
667 * pixels A pointer to be filled in with the pixel data
668 * pitch The pitch of the pixels parameter.
670 * 0 on success, or -1 if pixel reading is not supported.
672 * This is a very slow operation, and should not be used frequently.
674 function SDL_RenderReadPixels(renderer: PSDL_Renderer; rect: PSDL_Rect; format: UInt32; pixels: Pointer; pitch: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderReadPixels' {$ENDIF} {$ENDIF};
677 * Update the screen with rendering performed.
679 procedure SDL_RenderPresent(renderer: PSDL_Renderer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderPresent' {$ENDIF} {$ENDIF};
682 * Destroy the specified texture.
684 * SDL_CreateTexture()
685 * SDL_CreateTextureFromSurface()
687 procedure SDL_DestroyTexture(texture: PSDL_Texture) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyTexture' {$ENDIF} {$ENDIF};
690 * Destroy the rendering context for a window and free associated
693 * SDL_CreateRenderer()
695 procedure SDL_DestroyRenderer(renderer: PSDL_Renderer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyRenderer' {$ENDIF} {$ENDIF};
698 * Bind the texture to the current OpenGL/ES/ES2 context for use with
699 * OpenGL instructions.
701 * texture The SDL texture to bind
702 * texw A pointer to a float that will be filled with the texture width
703 * texh A pointer to a float that will be filled with the texture height
705 * 0 on success, or -1 if the operation is not supported
707 function SDL_GL_BindTexture(texture: PSDL_Texture; texw: PFloat; texh: PFloat): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_BindTexture' {$ENDIF} {$ENDIF};
710 * Unbind a texture from the current OpenGL/ES/ES2 context.
712 * texture The SDL texture to unbind
714 * 0 on success, or -1 if the operation is not supported
716 function SDL_GL_UnbindTexture(texture: PSDL_Texture): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_UnbindTexture' {$ENDIF} {$ENDIF};