sdl2/generated/lib_sdl_render library

Functions

sdlCreateRenderer(Pointer<SdlWindow> window, int index, int flags) Pointer<SdlRenderer>
Create a 2D rendering context for a window.
sdlCreateSoftwareRenderer(Pointer<SdlSurface> surface) Pointer<SdlRenderer>
Create a 2D software rendering context for a surface.
sdlCreateTexture(Pointer<SdlRenderer> renderer, int format, int access, int w, int h) Pointer<SdlTexture>
Create a texture for a rendering context.
sdlCreateTextureFromSurface(Pointer<SdlRenderer> renderer, Pointer<SdlSurface> surface) Pointer<SdlTexture>
Create a texture from an existing surface.
sdlCreateWindowAndRenderer(int width, int height, int windowFlags, Pointer<Pointer<SdlWindow>> window, Pointer<Pointer<SdlRenderer>> renderer) int
Create a window and default renderer.
sdlDestroyRenderer(Pointer<SdlRenderer> renderer) → void
Destroy the rendering context for a window and free associated textures.
sdlDestroyTexture(Pointer<SdlTexture> texture) → void
Destroy the specified texture.
sdlGetNumRenderDrivers() int
Get the number of 2D rendering drivers available for the current display.
sdlGetRenderDrawBlendMode(Pointer<SdlRenderer> renderer, Pointer<Int32> blendMode) int
Get the blend mode used for drawing operations.
sdlGetRenderDrawColor(Pointer<SdlRenderer> renderer, Pointer<Uint8> r, Pointer<Uint8> g, Pointer<Uint8> b, Pointer<Uint8> a) int
Get the color used for drawing operations (Rect, Line and Clear).
sdlGetRenderDriverInfo(int index, Pointer<SdlRendererInfo> info) int
Get info about a specific 2D rendering driver for the current display.
sdlGetRenderer(Pointer<SdlWindow> window) Pointer<SdlRenderer>
Get the renderer associated with a window.
sdlGetRendererInfo(Pointer<SdlRenderer> renderer, Pointer<SdlRendererInfo> info) int
Get information about a rendering context.
sdlGetRendererOutputSize(Pointer<SdlRenderer> renderer, Pointer<Int32> w, Pointer<Int32> h) int
Get the output size in pixels of a rendering context.
sdlGetRenderTarget(Pointer<SdlRenderer> renderer) Pointer<SdlTexture>
Get the current render target.
sdlGetTextureAlphaMod(Pointer<SdlTexture> texture, Pointer<Uint8> alpha) int
Get the additional alpha value multiplied into render copy operations.
sdlGetTextureBlendMode(Pointer<SdlTexture> texture, Pointer<Int32> blendMode) int
Get the blend mode used for texture copy operations.
sdlGetTextureColorMod(Pointer<SdlTexture> texture, Pointer<Uint8> r, Pointer<Uint8> g, Pointer<Uint8> b) int
Get the additional color value multiplied into render copy operations.
sdlGetTextureScaleMode(Pointer<SdlTexture> texture, Pointer<Int32> scaleMode) int
Get the scale mode used for texture scale operations.
sdlGetTextureUserData(Pointer<SdlTexture> texture) Pointer<NativeType>
Get the user-specified pointer associated with a texture
sdlGlBindTexture(Pointer<SdlTexture> texture, Pointer<Float> texw, Pointer<Float> texh) int
Bind an OpenGL/ES/ES2 texture to the current context.
sdlGlUnbindTexture(Pointer<SdlTexture> texture) int
Unbind an OpenGL/ES/ES2 texture from the current context.
sdlLockTexture(Pointer<SdlTexture> texture, Pointer<SdlRect> rect, Pointer<Pointer<NativeType>> pixels, Pointer<Int32> pitch) int
Lock a portion of the texture for write-only pixel access.
sdlLockTextureToSurface(Pointer<SdlTexture> texture, Pointer<SdlRect> rect, Pointer<Pointer<SdlSurface>> surface) int
Lock a portion of the texture for write-only pixel access, and expose it as a SDL surface.
sdlQueryTexture(Pointer<SdlTexture> texture, Pointer<Uint32> format, Pointer<Int32> access, Pointer<Int32> w, Pointer<Int32> h) int
Query the attributes of a texture.
sdlRenderClear(Pointer<SdlRenderer> renderer) int
Clear the current rendering target with the drawing color.
sdlRenderCopy(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlRect> srcrect, Pointer<SdlRect> dstrect) int
Copy a portion of the texture to the current rendering target.
sdlRenderCopyEx(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlRect> srcrect, Pointer<SdlRect> dstrect, double angle, Pointer<SdlPoint> center, int flip) int
Copy a portion of the texture to the current rendering, with optional rotation and flipping.
sdlRenderCopyExF(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlRect> srcrect, Pointer<SdlFRect> dstrect, double angle, Pointer<SdlFPoint> center, int flip) int
Copy a portion of the source texture to the current rendering target, with rotation and flipping, at subpixel precision.
sdlRenderCopyF(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlRect> srcrect, Pointer<SdlFRect> dstrect) int
Copy a portion of the texture to the current rendering target at subpixel precision.
sdlRenderDrawLine(Pointer<SdlRenderer> renderer, int x1, int y1, int x2, int y2) int
Draw a line on the current rendering target.
sdlRenderDrawLineF(Pointer<SdlRenderer> renderer, double x1, double y1, double x2, double y2) int
Draw a line on the current rendering target at subpixel precision.
sdlRenderDrawLines(Pointer<SdlRenderer> renderer, Pointer<SdlPoint> points, int count) int
Draw a series of connected lines on the current rendering target.
sdlRenderDrawLinesF(Pointer<SdlRenderer> renderer, Pointer<SdlFPoint> points, int count) int
Draw a series of connected lines on the current rendering target at subpixel precision.
sdlRenderDrawPoint(Pointer<SdlRenderer> renderer, int x, int y) int
Draw a point on the current rendering target.
sdlRenderDrawPointF(Pointer<SdlRenderer> renderer, double x, double y) int
Draw a point on the current rendering target at subpixel precision.
sdlRenderDrawPoints(Pointer<SdlRenderer> renderer, Pointer<SdlPoint> points, int count) int
Draw multiple points on the current rendering target.
sdlRenderDrawPointsF(Pointer<SdlRenderer> renderer, Pointer<SdlFPoint> points, int count) int
Draw multiple points on the current rendering target at subpixel precision.
sdlRenderDrawRect(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) int
Draw a rectangle on the current rendering target.
sdlRenderDrawRectF(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rect) int
Draw a rectangle on the current rendering target at subpixel precision.
sdlRenderDrawRects(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rects, int count) int
Draw some number of rectangles on the current rendering target.
sdlRenderDrawRectsF(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rects, int count) int
Draw some number of rectangles on the current rendering target at subpixel precision.
sdlRenderFillRect(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) int
Fill a rectangle on the current rendering target with the drawing color.
sdlRenderFillRectF(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rect) int
Fill a rectangle on the current rendering target with the drawing color at subpixel precision.
sdlRenderFillRects(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rects, int count) int
Fill some number of rectangles on the current rendering target with the drawing color.
sdlRenderFillRectsF(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rects, int count) int
Fill some number of rectangles on the current rendering target with the drawing color at subpixel precision.
sdlRenderFlush(Pointer<SdlRenderer> renderer) int
Force the rendering context to flush any pending commands to the underlying rendering API.
sdlRenderGeometry(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlVertex> vertices, int numVertices, Pointer<Int32> indices, int numIndices) int
Render a list of triangles, optionally using a texture and indices into the vertex array Color and alpha modulation is done per vertex (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
sdlRenderGeometryRaw(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<Float> xy, int xyStride, Pointer<SdlColor> color, int colorStride, Pointer<Float> uv, int uvStride, int numVertices, Pointer<NativeType> indices, int numIndices, int sizeIndices) int
Render a list of triangles, optionally using a texture and indices into the vertex arrays Color and alpha modulation is done per vertex (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
sdlRenderGetClipRect(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) → void
Get the clip rectangle for the current target.
sdlRenderGetIntegerScale(Pointer<SdlRenderer> renderer) bool
Get whether integer scales are forced for resolution-independent rendering.
sdlRenderGetLogicalSize(Pointer<SdlRenderer> renderer, Pointer<Int32> w, Pointer<Int32> h) → void
Get device independent resolution for rendering.
sdlRenderGetMetalCommandEncoder(Pointer<SdlRenderer> renderer) Pointer<NativeType>
Get the Metal command encoder for the current frame
sdlRenderGetMetalLayer(Pointer<SdlRenderer> renderer) Pointer<NativeType>
Get the CAMetalLayer associated with the given Metal renderer.
sdlRenderGetScale(Pointer<SdlRenderer> renderer, Pointer<Float> scaleX, Pointer<Float> scaleY) → void
Get the drawing scale for the current target.
sdlRenderGetViewport(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) → void
Get the drawing area for the current target.
sdlRenderGetWindow(Pointer<SdlRenderer> renderer) Pointer<SdlWindow>
Get the window associated with a renderer.
sdlRenderIsClipEnabled(Pointer<SdlRenderer> renderer) bool
Get whether clipping is enabled on the given renderer.
sdlRenderLogicalToWindow(Pointer<SdlRenderer> renderer, double logicalX, double logicalY, Pointer<Int32> windowX, Pointer<Int32> windowY) → void
Get real coordinates of point in window when given logical coordinates of point in renderer.
sdlRenderPresent(Pointer<SdlRenderer> renderer) → void
Update the screen with any rendering performed since the previous call.
sdlRenderReadPixels(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect, int format, Pointer<NativeType> pixels, int pitch) int
Read pixels from the current rendering target to an array of pixels.
sdlRenderSetClipRect(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) int
Set the clip rectangle for rendering on the specified target.
sdlRenderSetIntegerScale(Pointer<SdlRenderer> renderer, bool enable) int
Set whether to force integer scales for resolution-independent rendering.
sdlRenderSetLogicalSize(Pointer<SdlRenderer> renderer, int w, int h) int
Set a device independent resolution for rendering.
sdlRenderSetScale(Pointer<SdlRenderer> renderer, double scaleX, double scaleY) int
Set the drawing scale for rendering on the current target.
sdlRenderSetViewport(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) int
Set the drawing area for rendering on the current target.
sdlRenderSetVSync(Pointer<SdlRenderer> renderer, int vsync) int
Toggle VSync of the given renderer.
sdlRenderTargetSupported(Pointer<SdlRenderer> renderer) bool
Determine whether a renderer supports the use of render targets.
sdlRenderWindowToLogical(Pointer<SdlRenderer> renderer, int windowX, int windowY, Pointer<Float> logicalX, Pointer<Float> logicalY) → void
Get logical coordinates of point in renderer when given real coordinates of point in window.
sdlSetRenderDrawBlendMode(Pointer<SdlRenderer> renderer, int blendMode) int
Set the blend mode used for drawing operations (Fill and Line).
sdlSetRenderDrawColor(Pointer<SdlRenderer> renderer, int r, int g, int b, int a) int
Set the color used for drawing operations (Rect, Line and Clear).
sdlSetRenderTarget(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture) int
Set a texture as the current rendering target.
sdlSetTextureAlphaMod(Pointer<SdlTexture> texture, int alpha) int
Set an additional alpha value multiplied into render copy operations.
sdlSetTextureBlendMode(Pointer<SdlTexture> texture, int blendMode) int
Set the blend mode for a texture, used by SDL_RenderCopy().
sdlSetTextureColorMod(Pointer<SdlTexture> texture, int r, int g, int b) int
Set an additional color value multiplied into render copy operations.
sdlSetTextureScaleMode(Pointer<SdlTexture> texture, int scaleMode) int
Set the scale mode used for texture scale operations.
sdlSetTextureUserData(Pointer<SdlTexture> texture, Pointer<NativeType> userdata) int
Associate a user-specified pointer with a texture.
sdlUnlockTexture(Pointer<SdlTexture> texture) → void
Unlock a texture, uploading the changes to video memory, if needed.
sdlUpdateNvTexture(Pointer<SdlTexture> texture, Pointer<SdlRect> rect, Pointer<Uint8> yplane, int ypitch, Pointer<Uint8> uVplane, int uVpitch) int
Update a rectangle within a planar NV12 or NV21 texture with new pixels.
sdlUpdateTexture(Pointer<SdlTexture> texture, Pointer<SdlRect> rect, Pointer<NativeType> pixels, int pitch) int
Update the given texture rectangle with new pixel data.
sdlUpdateYuvTexture(Pointer<SdlTexture> texture, Pointer<SdlRect> rect, Pointer<Uint8> yplane, int ypitch, Pointer<Uint8> uplane, int upitch, Pointer<Uint8> vplane, int vpitch) int
Update a rectangle within a planar YV12 or IYUV texture with new pixel data.