sdl3/generated/lib_sdl_render library

Functions

sdlAddVulkanRenderSemaphores(Pointer<SdlRenderer> renderer, int waitStageMask, int waitSemaphore, int signalSemaphore) bool
Add a set of synchronization semaphores for the current frame.
sdlConvertEventToRenderCoordinates(Pointer<SdlRenderer> renderer, Pointer<SdlEvent> event) bool
Convert the coordinates in an event to render coordinates.
sdlCreateRenderer(Pointer<SdlWindow> window, String? name) Pointer<SdlRenderer>
Create a 2D rendering context for a window.
sdlCreateRendererWithProperties(int props) Pointer<SdlRenderer>
Create a 2D rendering context for a window, with the specified properties.
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.
sdlCreateTextureWithProperties(Pointer<SdlRenderer> renderer, int props) Pointer<SdlTexture>
Create a texture for a rendering context with the specified properties.
sdlCreateWindowAndRenderer(String? title, int width, int height, int windowFlags, Pointer<Pointer<SdlWindow>> window, Pointer<Pointer<SdlRenderer>> renderer) bool
Create a window and default renderer.
sdlDestroyRenderer(Pointer<SdlRenderer> renderer) → void
Destroy the rendering context for a window and free all associated textures.
sdlDestroyTexture(Pointer<SdlTexture> texture) → void
Destroy the specified texture.
sdlFlushRenderer(Pointer<SdlRenderer> renderer) bool
Force the rendering context to flush any pending commands and state.
sdlGetCurrentRenderOutputSize(Pointer<SdlRenderer> renderer, Pointer<Int32> w, Pointer<Int32> h) bool
Get the current output size in pixels of a rendering context.
sdlGetNumRenderDrivers() int
Get the number of 2D rendering drivers available for the current display.
sdlGetRenderClipRect(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) bool
Get the clip rectangle for the current target.
sdlGetRenderColorScale(Pointer<SdlRenderer> renderer, Pointer<Float> scale) bool
Get the color scale used for render operations.
sdlGetRenderDrawBlendMode(Pointer<SdlRenderer> renderer, Pointer<Uint32> blendMode) bool
Get the blend mode used for drawing operations.
sdlGetRenderDrawColor(Pointer<SdlRenderer> renderer, Pointer<Uint8> r, Pointer<Uint8> g, Pointer<Uint8> b, Pointer<Uint8> a) bool
Get the color used for drawing operations (Rect, Line and Clear).
sdlGetRenderDrawColorFloat(Pointer<SdlRenderer> renderer, Pointer<Float> r, Pointer<Float> g, Pointer<Float> b, Pointer<Float> a) bool
Get the color used for drawing operations (Rect, Line and Clear).
sdlGetRenderDriver(int index) String?
Use this function to get the name of a built in 2D rendering driver.
sdlGetRenderer(Pointer<SdlWindow> window) Pointer<SdlRenderer>
Get the renderer associated with a window.
sdlGetRendererFromTexture(Pointer<SdlTexture> texture) Pointer<SdlRenderer>
Get the renderer that created an SDL_Texture.
sdlGetRendererName(Pointer<SdlRenderer> renderer) String?
Get the name of a renderer.
sdlGetRendererProperties(Pointer<SdlRenderer> renderer) int
Get the properties associated with a renderer.
sdlGetRenderLogicalPresentation(Pointer<SdlRenderer> renderer, Pointer<Int32> w, Pointer<Int32> h, Pointer<Int32> mode) bool
Get device independent resolution and presentation mode for rendering.
sdlGetRenderLogicalPresentationRect(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rect) bool
Get the final presentation rectangle for rendering.
sdlGetRenderMetalCommandEncoder(Pointer<SdlRenderer> renderer) Pointer<NativeType>
Get the Metal command encoder for the current frame.
sdlGetRenderMetalLayer(Pointer<SdlRenderer> renderer) Pointer<NativeType>
Get the CAMetalLayer associated with the given Metal renderer.
sdlGetRenderOutputSize(Pointer<SdlRenderer> renderer, Pointer<Int32> w, Pointer<Int32> h) bool
Get the output size in pixels of a rendering context.
sdlGetRenderSafeArea(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) bool
Get the safe area for rendering within the current viewport.
sdlGetRenderScale(Pointer<SdlRenderer> renderer, Pointer<Float> scaleX, Pointer<Float> scaleY) bool
Get the drawing scale for the current target.
sdlGetRenderTarget(Pointer<SdlRenderer> renderer) Pointer<SdlTexture>
Get the current render target.
sdlGetRenderViewport(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) bool
Get the drawing area for the current target.
sdlGetRenderVSync(Pointer<SdlRenderer> renderer, Pointer<Int32> vsync) bool
Get VSync of the given renderer.
sdlGetRenderWindow(Pointer<SdlRenderer> renderer) Pointer<SdlWindow>
Get the window associated with a renderer.
sdlGetTextureAlphaMod(Pointer<SdlTexture> texture, Pointer<Uint8> alpha) bool
Get the additional alpha value multiplied into render copy operations.
sdlGetTextureAlphaModFloat(Pointer<SdlTexture> texture, Pointer<Float> alpha) bool
Get the additional alpha value multiplied into render copy operations.
sdlGetTextureBlendMode(Pointer<SdlTexture> texture, Pointer<Uint32> blendMode) bool
Get the blend mode used for texture copy operations.
sdlGetTextureColorMod(Pointer<SdlTexture> texture, Pointer<Uint8> r, Pointer<Uint8> g, Pointer<Uint8> b) bool
Get the additional color value multiplied into render copy operations.
sdlGetTextureColorModFloat(Pointer<SdlTexture> texture, Pointer<Float> r, Pointer<Float> g, Pointer<Float> b) bool
Get the additional color value multiplied into render copy operations.
sdlGetTextureProperties(Pointer<SdlTexture> texture) int
Get the properties associated with a texture.
sdlGetTextureScaleMode(Pointer<SdlTexture> texture, Pointer<Int32> scaleMode) bool
Get the scale mode used for texture scale operations.
sdlGetTextureSize(Pointer<SdlTexture> texture, Pointer<Float> w, Pointer<Float> h) bool
Get the size of a texture, as floating point values.
sdlLockTexture(Pointer<SdlTexture> texture, Pointer<SdlRect> rect, Pointer<Pointer<NativeType>> pixels, Pointer<Int32> pitch) bool
Lock a portion of the texture for write-only pixel access.
sdlLockTextureToSurface(Pointer<SdlTexture> texture, Pointer<SdlRect> rect, Pointer<Pointer<SdlSurface>> surface) bool
Lock a portion of the texture for write-only pixel access, and expose it as a SDL surface.
sdlRenderClear(Pointer<SdlRenderer> renderer) bool
Clear the current rendering target with the drawing color.
sdlRenderClipEnabled(Pointer<SdlRenderer> renderer) bool
Get whether clipping is enabled on the given renderer.
sdlRenderCoordinatesFromWindow(Pointer<SdlRenderer> renderer, double windowX, double windowY, Pointer<Float> x, Pointer<Float> y) bool
Get a point in render coordinates when given a point in window coordinates.
sdlRenderCoordinatesToWindow(Pointer<SdlRenderer> renderer, double x, double y, Pointer<Float> windowX, Pointer<Float> windowY) bool
Get a point in window coordinates when given a point in render coordinates.
sdlRenderDebugText(Pointer<SdlRenderer> renderer, double x, double y, String? str) bool
Draw debug text to an SDL_Renderer.
sdlRenderDebugTextFormat(Pointer<SdlRenderer> renderer, double x, double y, String? fmt, Pointer<NativeType> arg4) bool
Draw debug text to an SDL_Renderer.
sdlRenderFillRect(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rect) bool
Fill a rectangle on the current rendering target with the drawing color at subpixel precision.
sdlRenderFillRects(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rects, int count) bool
Fill some number of rectangles on the current rendering target with the drawing color at subpixel precision.
sdlRenderGeometry(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlVertex> vertices, int numVertices, Pointer<Int32> indices, int numIndices) bool
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<SdlFColor> color, int colorStride, Pointer<Float> uv, int uvStride, int numVertices, Pointer<NativeType> indices, int numIndices, int sizeIndices) bool
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).
sdlRenderLine(Pointer<SdlRenderer> renderer, double x1, double y1, double x2, double y2) bool
Draw a line on the current rendering target at subpixel precision.
sdlRenderLines(Pointer<SdlRenderer> renderer, Pointer<SdlFPoint> points, int count) bool
Draw a series of connected lines on the current rendering target at subpixel precision.
sdlRenderPoint(Pointer<SdlRenderer> renderer, double x, double y) bool
Draw a point on the current rendering target at subpixel precision.
sdlRenderPoints(Pointer<SdlRenderer> renderer, Pointer<SdlFPoint> points, int count) bool
Draw multiple points on the current rendering target at subpixel precision.
sdlRenderPresent(Pointer<SdlRenderer> renderer) bool
Update the screen with any rendering performed since the previous call.
sdlRenderReadPixels(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) Pointer<SdlSurface>
Read pixels from the current rendering target.
sdlRenderRect(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rect) bool
Draw a rectangle on the current rendering target at subpixel precision.
sdlRenderRects(Pointer<SdlRenderer> renderer, Pointer<SdlFRect> rects, int count) bool
Draw some number of rectangles on the current rendering target at subpixel precision.
sdlRenderTexture(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlFRect> srcrect, Pointer<SdlFRect> dstrect) bool
Copy a portion of the texture to the current rendering target at subpixel precision.
sdlRenderTexture9Grid(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlFRect> srcrect, double leftWidth, double rightWidth, double topHeight, double bottomHeight, double scale, Pointer<SdlFRect> dstrect) bool
Perform a scaled copy using the 9-grid algorithm to the current rendering target at subpixel precision.
sdlRenderTextureAffine(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlFRect> srcrect, Pointer<SdlFPoint> origin, Pointer<SdlFPoint> right, Pointer<SdlFPoint> down) bool
Copy a portion of the source texture to the current rendering target, with affine transform, at subpixel precision.
sdlRenderTextureRotated(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlFRect> srcrect, Pointer<SdlFRect> dstrect, double angle, Pointer<SdlFPoint> center, int flip) bool
Copy a portion of the source texture to the current rendering target, with rotation and flipping, at subpixel precision.
sdlRenderTextureTiled(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture, Pointer<SdlFRect> srcrect, double scale, Pointer<SdlFRect> dstrect) bool
Tile a portion of the texture to the current rendering target at subpixel precision.
sdlRenderViewportSet(Pointer<SdlRenderer> renderer) bool
Return whether an explicit rectangle was set as the viewport.
sdlSetRenderClipRect(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) bool
Set the clip rectangle for rendering on the specified target.
sdlSetRenderColorScale(Pointer<SdlRenderer> renderer, double scale) bool
Set the color scale used for render operations.
sdlSetRenderDrawBlendMode(Pointer<SdlRenderer> renderer, int blendMode) bool
Set the blend mode used for drawing operations (Fill and Line).
sdlSetRenderDrawColor(Pointer<SdlRenderer> renderer, int r, int g, int b, int a) bool
Set the color used for drawing operations.
sdlSetRenderDrawColorFloat(Pointer<SdlRenderer> renderer, double r, double g, double b, double a) bool
Set the color used for drawing operations (Rect, Line and Clear).
sdlSetRenderLogicalPresentation(Pointer<SdlRenderer> renderer, int w, int h, int mode) bool
Set a device independent resolution and presentation mode for rendering.
sdlSetRenderScale(Pointer<SdlRenderer> renderer, double scaleX, double scaleY) bool
Set the drawing scale for rendering on the current target.
sdlSetRenderTarget(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture) bool
Set a texture as the current rendering target.
sdlSetRenderViewport(Pointer<SdlRenderer> renderer, Pointer<SdlRect> rect) bool
Set the drawing area for rendering on the current target.
sdlSetRenderVSync(Pointer<SdlRenderer> renderer, int vsync) bool
Toggle VSync of the given renderer.
sdlSetTextureAlphaMod(Pointer<SdlTexture> texture, int alpha) bool
Set an additional alpha value multiplied into render copy operations.
sdlSetTextureAlphaModFloat(Pointer<SdlTexture> texture, double alpha) bool
Set an additional alpha value multiplied into render copy operations.
sdlSetTextureBlendMode(Pointer<SdlTexture> texture, int blendMode) bool
Set the blend mode for a texture, used by SDL_RenderTexture().
sdlSetTextureColorMod(Pointer<SdlTexture> texture, int r, int g, int b) bool
Set an additional color value multiplied into render copy operations.
sdlSetTextureColorModFloat(Pointer<SdlTexture> texture, double r, double g, double b) bool
Set an additional color value multiplied into render copy operations.
sdlSetTextureScaleMode(Pointer<SdlTexture> texture, int scaleMode) bool
Set the scale mode used for texture scale operations.
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) bool
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) bool
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) bool
Update a rectangle within a planar YV12 or IYUV texture with new pixel data.