Header menu logo Mibo

Draw Type

The unified fluent draw DSL. Chain members on the render buffer:

 buffer
   .BeginCamera(camera)
   .FillCircle(400f, 300f, 48f, Color.Blue)
   .Sprite(playerSprite)
   .EndCamera()
   .Text(font, "HP 100", Vector2(10f, 10f), 20f, layer = 1001<RenderLayer>)
 |> ignore
namespace Microsoft.FSharp.Text
val ignore: value: 'T -> unit

Static members

Static member Description

Draw.addDirectionalLight (buffer, light)

Full Usage: Draw.addDirectionalLight (buffer, light)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Adds a directional light to the scene.

buffer : ^B
light : DirectionalLight3D
Returns: ^B

Draw.addDirectionalLight (buffer, lightCtx, direction, color, ?intensity, ?castsShadows, ?layer)

Full Usage: Draw.addDirectionalLight (buffer, lightCtx, direction, color, ?intensity, ?castsShadows, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C

Adds a 2D directional light from parts.

buffer : ^B
lightCtx : 'C
direction : Vector2
color : Color
?intensity : float32
?castsShadows : bool
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.addDirectionalLight (buffer, lightCtx, light, ?layer)

Full Usage: Draw.addDirectionalLight (buffer, lightCtx, light, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C, 'L

Adds a 2D directional light from the backend's light record.

buffer : ^B
lightCtx : 'C
light : 'L
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.addOccluder (buffer, lightCtx, occluder, ?layer)

Full Usage: Draw.addOccluder (buffer, lightCtx, occluder, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C, 'O

Adds a shadow-casting occluder segment for this frame.

buffer : ^B
lightCtx : 'C
occluder : 'O
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.addPointLight (buffer, light)

Full Usage: Draw.addPointLight (buffer, light)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Adds a point light to the scene.

buffer : ^B
light : PointLight3D
Returns: ^B

Draw.addPointLight (buffer, lightCtx, light, ?layer)

Full Usage: Draw.addPointLight (buffer, lightCtx, light, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C, 'L

Adds a 2D point light for this frame.

buffer : ^B
lightCtx : 'C
light : 'L
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.addSpotLight (buffer, light)

Full Usage: Draw.addSpotLight (buffer, light)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Adds a spot light to the scene.

buffer : ^B
light : SpotLight3D
Returns: ^B

Draw.animatedModel (buffer, animModel, transform)

Full Usage: Draw.animatedModel (buffer, animModel, transform)

Parameters:
    buffer : ^B
    animModel : 'A
    transform : 'X

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'A, 'X

Draws an animated (skinned) model from the backend's animation state record. The witness derives the bone palette (MonoGame: from the state; raylib: applies it to the model).

buffer : ^B
animModel : 'A
transform : 'X
Returns: ^B

Draw.animatedModelWith (buffer, animModel, transform, material)

Full Usage: Draw.animatedModelWith (buffer, animModel, transform, material)

Parameters:
    buffer : ^B
    animModel : 'A
    transform : 'X
    material : 'Mat

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'A, 'X, 'Mat

Draws an animated model with a whole-model material override.

buffer : ^B
animModel : 'A
transform : 'X
material : 'Mat
Returns: ^B

Draw.animatedModelWithPerMesh (buffer, animModel, transform, resolver)

Full Usage: Draw.animatedModelWithPerMesh (buffer, animModel, transform, resolver)

Parameters:
    buffer : ^B
    animModel : 'A
    transform : 'X
    resolver : int -> 'Mat

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'A, 'X, 'Mat

Draws an animated model with a per-sub-mesh material resolver.

buffer : ^B
animModel : 'A
transform : 'X
resolver : int -> 'Mat
Returns: ^B

Draw.beginCamera (buffer, camera, ?layer)

Full Usage: Draw.beginCamera (buffer, camera, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C

Begins a camera transform (2D or 3D — the buffer selects the witness).

buffer : ^B
camera : 'C
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.beginCameraWith (buffer, config, ?layer)

Full Usage: Draw.beginCameraWith (buffer, config, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C

Begins a camera with explicit rendering config (viewport, clear).

buffer : ^B
config : 'C
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.beginEffect (buffer, shader)

Full Usage: Draw.beginEffect (buffer, shader)

Parameters:
    buffer : ^B
    shader : 'S

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'S

Opens a per-group shading scope: draws until EndEffect are shaded by shader instead of the default PBR shader, inheriting the gathered scene data (camera, lights, shadow pass, bones, time).

buffer : ^B
shader : 'S
Returns: ^B

Draw.beginShader (buffer, shader, ?layer)

Full Usage: Draw.beginShader (buffer, shader, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'S

Begins a 2D shader/effect block.

buffer : ^B
shader : 'S
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.beginTarget (buffer, target, ?layer)

Full Usage: Draw.beginTarget (buffer, target, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'T

Begins rendering to a render target.

buffer : ^B
target : 'T
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.bezier (buffer, start, control, finish, color, ?thickness, ?layer)

Full Usage: Draw.bezier (buffer, start, control, finish, color, ?thickness, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Quadratic bezier curve.

buffer : ^B
start : Vector2
control : Vector2
finish : Vector2
color : Color
?thickness : float32
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.billboard (buffer, texture, position, size, color)

Full Usage: Draw.billboard (buffer, texture, position, size, color)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'T

Draws a billboard (camera-facing quad) with a texture.

buffer : ^B
texture : 'T
position : Vector3
size : Vector2
color : Color
Returns: ^B

Draw.billboardBatch (buffer, textures, positions, sizes, colors, count)

Full Usage: Draw.billboardBatch (buffer, textures, positions, sizes, colors, count)

Parameters:
    buffer : ^B
    textures : 'T[]
    positions : 'P[]
    sizes : 'S[]
    colors : 'C[]
    count : int

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'T, 'P, 'S, 'C
Draws multiple billboards in a single batch. All arrays are
 backend handles (XNA arrays on MonoGame) — no per-frame conversion.
buffer : ^B
textures : 'T[]
positions : 'P[]
sizes : 'S[]
colors : 'C[]
count : int
Returns: ^B

Draw.circleGradient (buffer, centerX, centerY, radius, inner, outer, ?layer)

Full Usage: Draw.circleGradient (buffer, centerX, centerY, radius, inner, outer, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Radial gradient circle (int pixel center, matching the existing API).

buffer : ^B
centerX : int
centerY : int
radius : float32
inner : Color
outer : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.circleOutline (buffer, center, radius, color, ?layer)

Full Usage: Draw.circleOutline (buffer, center, radius, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Circle outline.

buffer : ^B
center : Vector2
radius : float32
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.circleSector (buffer, center, radius, startAngle, endAngle, color, ?segments, ?layer)

Full Usage: Draw.circleSector (buffer, center, radius, startAngle, endAngle, color, ?segments, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Filled circle sector (pie slice).

buffer : ^B
center : Vector2
radius : float32
startAngle : float32
endAngle : float32
color : Color
?segments : int
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.circleSectorOutline (buffer, center, radius, startAngle, endAngle, color, ?segments, ?layer)

Full Usage: Draw.circleSectorOutline (buffer, center, radius, startAngle, endAngle, color, ?segments, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Circle sector outline.

buffer : ^B
center : Vector2
radius : float32
startAngle : float32
endAngle : float32
color : Color
?segments : int
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.clear (buffer, color, ?layer)

Full Usage: Draw.clear (buffer, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Clears the current framebuffer to the given color.

buffer : ^B
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.clearScissor (buffer, ?layer)

Full Usage: Draw.clearScissor (buffer, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Disables scissor testing.

buffer : ^B
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.disableShadows buffer

Full Usage: Draw.disableShadows buffer

Parameters:
    buffer : ^B

Returns: ^B
Modifiers: inline
Type parameters: ^B

Disables 3D shadow casting for subsequent geometry.

buffer : ^B
Returns: ^B

Draw.disableShadows (buffer, lightCtx, ?layer)

Full Usage: Draw.disableShadows (buffer, lightCtx, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C

Disables 2D shadow casting for subsequent draws.

buffer : ^B
lightCtx : 'C
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.drawImmediate (buffer, action, ?layer)

Full Usage: Draw.drawImmediate (buffer, action, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'Ctx

Runs a fully-custom draw. 2D: action is unit -> unit (batch is flushed, state restored). 3D: action receives the frame's SceneContext. The 3D witness ignores layer (3D has no layers).

buffer : ^B
action : 'Ctx -> unit
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.drop buffer

Full Usage: Draw.drop buffer

Parameters:
    buffer : 'B

Modifiers: inline
Type parameters: 'B

Terminal function that discards the buffer, silencing the unused-value warning.

buffer : 'B

Draw.ellipseOutline (buffer, centerX, centerY, radiusH, radiusV, color, ?layer)

Full Usage: Draw.ellipseOutline (buffer, centerX, centerY, radiusH, radiusV, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Ellipse outline (int pixel center, matching the existing API).

buffer : ^B
centerX : int
centerY : int
radiusH : float32
radiusV : float32
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.enableShadows buffer

Full Usage: Draw.enableShadows buffer

Parameters:
    buffer : ^B

Returns: ^B
Modifiers: inline
Type parameters: ^B

Enables 3D shadow casting for subsequent geometry.

buffer : ^B
Returns: ^B

Draw.enableShadows (buffer, lightCtx, ?layer)

Full Usage: Draw.enableShadows (buffer, lightCtx, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C

Enables 2D shadow casting for subsequent draws.

buffer : ^B
lightCtx : 'C
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.endCamera (buffer, ?layer)

Full Usage: Draw.endCamera (buffer, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Ends the current camera transform.

buffer : ^B
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.endEffect buffer

Full Usage: Draw.endEffect buffer

Parameters:
    buffer : ^B

Returns: ^B
Modifiers: inline
Type parameters: ^B

Closes the shading scope opened by BeginEffect.

buffer : ^B
Returns: ^B

Draw.endLighting (buffer, lightCtx, ?layer)

Full Usage: Draw.endLighting (buffer, lightCtx, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C

Ends the current lighting pass; sprites after this point are unlit.

buffer : ^B
lightCtx : 'C
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.endShader (buffer, ?layer)

Full Usage: Draw.endShader (buffer, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Ends the current 2D shader block.

buffer : ^B
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.endTarget (buffer, ?layer)

Full Usage: Draw.endTarget (buffer, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Ends rendering to a render target.

buffer : ^B
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.fillCircle (buffer, center, radius, color, ?layer)

Full Usage: Draw.fillCircle (buffer, center, radius, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Filled circle.

buffer : ^B
center : Vector2
radius : float32
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.fillEllipse (buffer, centerX, centerY, radiusH, radiusV, color, ?layer)

Full Usage: Draw.fillEllipse (buffer, centerX, centerY, radiusH, radiusV, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Filled ellipse (int pixel center, matching the existing API).

buffer : ^B
centerX : int
centerY : int
radiusH : float32
radiusV : float32
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.fillPoly (buffer, center, sides, radius, rotation, color, ?layer)

Full Usage: Draw.fillPoly (buffer, center, sides, radius, rotation, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Filled regular polygon.

buffer : ^B
center : Vector2
sides : int
radius : float32
rotation : float32
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.fillRect (buffer, x, y, w, h, color, ?layer)

Full Usage: Draw.fillRect (buffer, x, y, w, h, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Filled rectangle. Coordinates are float pixels (truncated toward zero on MonoGame).

buffer : ^B
x : float32
y : float32
w : float32
h : float32
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.fillRectRounded (buffer, x, y, w, h, color, ?roundness, ?segments, ?layer)

Full Usage: Draw.fillRectRounded (buffer, x, y, w, h, color, ?roundness, ?segments, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Filled rounded rectangle.

buffer : ^B
x : float32
y : float32
w : float32
h : float32
color : Color
?roundness : float32
?segments : int
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.fillRing (buffer, center, innerRadius, outerRadius, startAngle, endAngle, color, ?segments, ?layer)

Full Usage: Draw.fillRing (buffer, center, innerRadius, outerRadius, startAngle, endAngle, color, ?segments, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Filled ring / arc.

buffer : ^B
center : Vector2
innerRadius : float32
outerRadius : float32
startAngle : float32
endAngle : float32
color : Color
?segments : int
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.instanced (buffer, mesh, transforms, material, instanceCount)

Full Usage: Draw.instanced (buffer, mesh, transforms, material, instanceCount)

Parameters:
    buffer : ^B
    mesh : 'M
    transforms : 'X[]
    material : 'Mat
    instanceCount : int

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'M, 'X, 'Mat

Draws many instances of the same mesh. Prefer over repeated Mesh calls.

buffer : ^B
mesh : 'M
transforms : 'X[]
material : 'Mat
instanceCount : int
Returns: ^B

Draw.line (buffer, start, finish, color, ?layer)

Full Usage: Draw.line (buffer, start, finish, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

1-pixel line.

buffer : ^B
start : Vector2
finish : Vector2
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.line3D (buffer, start, finish, color)

Full Usage: Draw.line3D (buffer, start, finish, color)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Draws a 3D line between two points.

buffer : ^B
start : Vector3
finish : Vector3
color : Color
Returns: ^B

Draw.lineStrip (buffer, points, color, ?layer)

Full Usage: Draw.lineStrip (buffer, points, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'P
Connected line segments. The point array is a backend handle
 (System.Numerics on raylib, XNA on MonoGame) — no per-frame conversion.
 Single-point members take System.Numerics and convert for free.
buffer : ^B
points : 'P[]
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.lineThick (buffer, start, finish, color, ?thickness, ?layer)

Full Usage: Draw.lineThick (buffer, start, finish, color, ?thickness, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Line with custom thickness.

buffer : ^B
start : Vector2
finish : Vector2
color : Color
?thickness : float32
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.litAnimatedSprite (buffer, lightCtx, dest, animSprite, ?layer)

Full Usage: Draw.litAnimatedSprite (buffer, lightCtx, dest, animSprite, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C, 'R, 'A

Draws an animated sprite with the current lighting state.

buffer : ^B
lightCtx : 'C
dest : 'R
animSprite : 'A
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.litSprite (buffer, lightCtx, sprite)

Full Usage: Draw.litSprite (buffer, lightCtx, sprite)

Parameters:
    buffer : ^B
    lightCtx : 'C
    sprite : 'S

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C, 'S

Draws a sprite with the current lighting state.

buffer : ^B
lightCtx : 'C
sprite : 'S
Returns: ^B

Draw.mesh (buffer, mesh, transform, material)

Full Usage: Draw.mesh (buffer, mesh, transform, material)

Parameters:
    buffer : ^B
    mesh : 'M
    transform : 'X
    material : 'Mat

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'M, 'X, 'Mat

Draws a mesh (raylib Mesh / MonoGame PrimitiveMesh) with a material.

buffer : ^B
mesh : 'M
transform : 'X
material : 'Mat
Returns: ^B

Draw.model (buffer, model, transform)

Full Usage: Draw.model (buffer, model, transform)

Parameters:
    buffer : ^B
    model : 'M
    transform : 'X

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'M, 'X

Draws a model with a world transform and its authored materials.

buffer : ^B
model : 'M
transform : 'X
Returns: ^B

Draw.modelWith (buffer, model, transform, material)

Full Usage: Draw.modelWith (buffer, model, transform, material)

Parameters:
    buffer : ^B
    model : 'M
    transform : 'X
    material : 'Mat

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'M, 'X, 'Mat

Draws a model with a whole-model material override.

buffer : ^B
model : 'M
transform : 'X
material : 'Mat
Returns: ^B

Draw.modelWithPerMesh (buffer, model, transform, resolver)

Full Usage: Draw.modelWithPerMesh (buffer, model, transform, resolver)

Parameters:
    buffer : ^B
    model : 'M
    transform : 'X
    resolver : int -> 'Mat

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'M, 'X, 'Mat

Draws a model with a per-sub-mesh material resolver.

buffer : ^B
model : 'M
transform : 'X
resolver : int -> 'Mat
Returns: ^B

Draw.particles (buffer, texture, particles, count, ?layer)

Full Usage: Draw.particles (buffer, texture, particles, count, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'T, 'P

Adds a batched particle render command.

buffer : ^B
texture : 'T
particles : 'P[]
count : int
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.polyOutline (buffer, center, sides, radius, rotation, color, ?thickness, ?layer)

Full Usage: Draw.polyOutline (buffer, center, sides, radius, rotation, color, ?thickness, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Regular polygon outline.

buffer : ^B
center : Vector2
sides : int
radius : float32
rotation : float32
color : Color
?thickness : float32
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.postProcess (buffer, action)

Full Usage: Draw.postProcess (buffer, action)

Parameters:
    buffer : ^B
    action : 'Ctx -> unit

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'Ctx

Enqueues a post-process pass. The action receives the backend's post-process context (2D or 3D) and runs once after the scene renders.

buffer : ^B
action : 'Ctx -> unit
Returns: ^B

Draw.postProcessWithDepth (buffer, action)

Full Usage: Draw.postProcessWithDepth (buffer, action)

Parameters:
    buffer : ^B
    action : 'Ctx -> unit

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'Ctx

Enqueues a post-process pass that needs camera-POV scene depth. 3D only — the 2D buffer has no witness.

buffer : ^B
action : 'Ctx -> unit
Returns: ^B

Draw.rectGradient (buffer, x, y, w, h, topLeft, bottomLeft, topRight, bottomRight, ?layer)

Full Usage: Draw.rectGradient (buffer, x, y, w, h, topLeft, bottomLeft, topRight, bottomRight, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

4-corner gradient rectangle.

buffer : ^B
x : float32
y : float32
w : float32
h : float32
topLeft : Color
bottomLeft : Color
topRight : Color
bottomRight : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.rectGradientH (buffer, x, y, w, h, left, right, ?layer)

Full Usage: Draw.rectGradientH (buffer, x, y, w, h, left, right, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Horizontal gradient rectangle (int pixel coords, matching the existing API).

buffer : ^B
x : int
y : int
w : int
h : int
left : Color
right : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.rectGradientV (buffer, x, y, w, h, top, bottom, ?layer)

Full Usage: Draw.rectGradientV (buffer, x, y, w, h, top, bottom, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Vertical gradient rectangle (int pixel coords, matching the existing API).

buffer : ^B
x : int
y : int
w : int
h : int
top : Color
bottom : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.rectOutline (buffer, x, y, w, h, color, ?thickness, ?layer)

Full Usage: Draw.rectOutline (buffer, x, y, w, h, color, ?thickness, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Rectangle outline.

buffer : ^B
x : float32
y : float32
w : float32
h : float32
color : Color
?thickness : float32
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.rectRoundedOutline (buffer, x, y, w, h, color, ?roundness, ?segments, ?thickness, ?layer)

Full Usage: Draw.rectRoundedOutline (buffer, x, y, w, h, color, ?roundness, ?segments, ?thickness, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Rounded rectangle outline.

buffer : ^B
x : float32
y : float32
w : float32
h : float32
color : Color
?roundness : float32
?segments : int
?thickness : float32
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.ringOutline (buffer, center, innerRadius, outerRadius, startAngle, endAngle, color, ?segments, ?layer)

Full Usage: Draw.ringOutline (buffer, center, innerRadius, outerRadius, startAngle, endAngle, color, ?segments, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Ring / arc outline.

buffer : ^B
center : Vector2
innerRadius : float32
outerRadius : float32
startAngle : float32
endAngle : float32
color : Color
?segments : int
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.setAmbient (buffer, lightCtx, color, ?layer)

Full Usage: Draw.setAmbient (buffer, lightCtx, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'C

Sets the ambient light color for this frame.

buffer : ^B
lightCtx : 'C
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.setAmbientLight (buffer, light)

Full Usage: Draw.setAmbientLight (buffer, light)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Sets the ambient light for the scene.

buffer : ^B
light : AmbientLight3D
Returns: ^B

Draw.setBlend (buffer, mode, ?layer)

Full Usage: Draw.setBlend (buffer, mode, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'M

Sets the blending mode (backend handle: raylib BlendMode enum or MonoGame BlendMode DU).

buffer : ^B
mode : 'M
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.setLineWidth (buffer, width, ?layer)

Full Usage: Draw.setLineWidth (buffer, width, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Sets the line width for subsequent line draws.

buffer : ^B
width : float32
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.setSamplerState (buffer, sampler, ?layer)

Full Usage: Draw.setSamplerState (buffer, sampler, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'S

Sets the sampler state (e.g. SamplerState.PointClamp) — stops tile-atlas bleeding. MonoGame only: the raylib buffer has no witness, so calling this there is a compile error.

buffer : ^B
sampler : 'S
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.setScissor (buffer, x, y, w, h, ?layer)

Full Usage: Draw.setScissor (buffer, x, y, w, h, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Enables scissor testing.

buffer : ^B
x : int
y : int
w : int
h : int
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.setShadowOrigin (buffer, origin)

Full Usage: Draw.setShadowOrigin (buffer, origin)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Sets the shadow origin for this frame's shadow pass.

buffer : ^B
origin : Vector3
Returns: ^B

Draw.setViewport (buffer, x, y, w, h, ?layer)

Full Usage: Draw.setViewport (buffer, x, y, w, h, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Sets the viewport rectangle.

buffer : ^B
x : int
y : int
w : int
h : int
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.skinnedMesh (buffer, mesh, transform, material, bones)

Full Usage: Draw.skinnedMesh (buffer, mesh, transform, material, bones)

Parameters:
    buffer : ^B
    mesh : 'M
    transform : 'X
    material : 'Mat
    bones : 'Bones

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'M, 'X, 'Mat, 'Bones

Draws a skinned mesh with an explicit bone palette and material. raylib only — MonoGame's skinned path goes through AnimatedModel.

buffer : ^B
mesh : 'M
transform : 'X
material : 'Mat
bones : 'Bones
Returns: ^B

Draw.sprite (buffer, state)

Full Usage: Draw.sprite (buffer, state)

Parameters:
    buffer : ^B
    state : 'S

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'S

Draws a sprite from the backend's SpriteState record.

buffer : ^B
state : 'S
Returns: ^B

Draw.text (buffer, font, text, position, size, ?tint, ?spacing, ?layer)

Full Usage: Draw.text (buffer, font, text, position, size, ?tint, ?spacing, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'F

Draws text from parts. size maps to the backend's sizing model (raylib: font size in pixels; MonoGame: uniform scale). spacing is used by raylib and ignored by MonoGame.

buffer : ^B
font : 'F
text : string
position : Vector2
size : float32
?tint : Color
?spacing : float32
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.text (buffer, state)

Full Usage: Draw.text (buffer, state)

Parameters:
    buffer : ^B
    state : 'S

Returns: ^B
Modifiers: inline
Type parameters: ^B, 'S

Draws text from the backend's TextState record.

buffer : ^B
state : 'S
Returns: ^B

Draw.triangle (buffer, v1, v2, v3, color, ?layer)

Full Usage: Draw.triangle (buffer, v1, v2, v3, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B

Filled triangle from 3 vertices.

buffer : ^B
v1 : Vector2
v2 : Vector2
v3 : Vector2
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.triangleFan (buffer, points, color, ?layer)

Full Usage: Draw.triangleFan (buffer, points, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'P

Filled triangle fan. Points array is a backend handle (see LineStrip).

buffer : ^B
points : 'P[]
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Draw.triangleStrip (buffer, points, color, ?layer)

Full Usage: Draw.triangleStrip (buffer, points, color, ?layer)

Parameters:
Returns: ^B
Modifiers: inline
Type parameters: ^B, 'P

Filled triangle strip. Points array is a backend handle (see LineStrip).

buffer : ^B
points : 'P[]
color : Color
?layer : int<MeasureProduct<RenderLayer, MeasureOne>>
Returns: ^B

Type something to start searching.