Header menu logo Mibo

RenderCmd2D Type

A 2D render command.

These commands are queued to a RenderBuffer and executed by Batch2DRenderer.

Union cases

Union case Description

ClearTarget(clearColor, clearDepth)

Full Usage: ClearTarget(clearColor, clearDepth)

Parameters:
    clearColor : Color voption
    clearDepth : bool

Clear the render target. Use between cameras in multi-camera setups.

clearColor : Color voption
clearDepth : bool

DrawCustom draw

Full Usage: DrawCustom draw

Parameters:

Escape hatch: run an arbitrary draw function. The function is invoked outside of SpriteBatch (SpriteBatch is ended before calling it).

draw : GameContext -> unit

DrawTexture(texture, dest, source, color, rotation, origin, effects, depth)

Full Usage: DrawTexture(texture, dest, source, color, rotation, origin, effects, depth)

Parameters:

Draws a textured quad.

texture : Texture2D
dest : Rectangle
source : Nullable<Rectangle>
color : Color
rotation : float32
origin : Vector2
effects : SpriteEffects
depth : float32

SetBlendState blendState

Full Usage: SetBlendState blendState

Parameters:

Set SpriteBatch blend state for subsequent draws.

blendState : BlendState

SetCamera camera

Full Usage: SetCamera camera

Parameters:

Changes the camera transform for subsequent draws.

camera : Camera

SetDepthStencilState depthStencilState

Full Usage: SetDepthStencilState depthStencilState

Parameters:

Set SpriteBatch depth-stencil state for subsequent draws.

depthStencilState : DepthStencilState

SetEffect effect

Full Usage: SetEffect effect

Parameters:

Set the SpriteBatch effect for subsequent draws. ValueNone means "use the renderer's configured default".

effect : Effect voption

SetRasterizerState rasterizerState

Full Usage: SetRasterizerState rasterizerState

Parameters:

Set SpriteBatch rasterizer state for subsequent draws.

rasterizerState : RasterizerState

SetSamplerState samplerState

Full Usage: SetSamplerState samplerState

Parameters:

Set SpriteBatch sampler state for subsequent draws.

samplerState : SamplerState

SetViewport viewport

Full Usage: SetViewport viewport

Parameters:

Set viewport for multi-camera rendering (split-screen, minimaps, etc).

viewport : Viewport

Instance members

Instance member Description

this.IsClearTarget

Full Usage: this.IsClearTarget

Returns: bool
Returns: bool

this.IsDrawCustom

Full Usage: this.IsDrawCustom

Returns: bool
Returns: bool

this.IsDrawTexture

Full Usage: this.IsDrawTexture

Returns: bool
Returns: bool

this.IsSetBlendState

Full Usage: this.IsSetBlendState

Returns: bool
Returns: bool

this.IsSetCamera

Full Usage: this.IsSetCamera

Returns: bool
Returns: bool

this.IsSetDepthStencilState

Full Usage: this.IsSetDepthStencilState

Returns: bool
Returns: bool

this.IsSetEffect

Full Usage: this.IsSetEffect

Returns: bool
Returns: bool

this.IsSetRasterizerState

Full Usage: this.IsSetRasterizerState

Returns: bool
Returns: bool

this.IsSetSamplerState

Full Usage: this.IsSetSamplerState

Returns: bool
Returns: bool

this.IsSetViewport

Full Usage: this.IsSetViewport

Returns: bool
Returns: bool

Type something to start searching.