id: sdl.sdlrender title: SDL.SDLRender
SDLRender contains functions for 2D accelerated rendering.
This API supports the following features:
The texture images can have an additional color tint or alpha modulation applied to them, and may also be stretched with linear interpolation, rotated or flipped/mirrored.
For advanced functionality like particle effects or actual 3D you should use SDL's OpenGL/Direct3D support or one of the many available 3D engines.
This API is not designed to be used from multiple threads.
| Type | Description |
|---|---|
| TSDLRenderer | A 2D rendering context. |
| TSDLTexture | An efficient driver-specific representation of pixel data. |
Function SDLGetNumRenderDrivers:Int()Gets the number of 2D rendering drivers available for the current display.
Const SDL_TEXTUREACCESS_STATIC:Int = 0changes rarely, not lockable
Const SDL_TEXTUREACCESS_STREAMING:Int = 1changes frequently, lockable
Const SDL_TEXTUREACCESS_TARGET:Int = 2can be used as a render target
Const SDL_FLIP_NONE:Int = 0do not flip
Const SDL_FLIP_HORIZONTAL:Int = 1flip horizontally
Const SDL_FLIP_VERTICAL:Int = 2flip vertically
Const SDL_RENDERER_SOFTWARE:Int = $01the renderer is a software fallback
Const SDL_RENDERER_ACCELERATED:Int = $02the renderer uses hardware acceleration
Const SDL_RENDERER_PRESENTVSYNC:Int = $04present is synchronized with the refresh rate
Const SDL_RENDERER_TARGETTEXTURE:Int = $08the renderer supports rendering to texture