Skip to content

A414AB4E

Marcel Härtel edited this page Aug 27, 2023 · 2 revisions

BeginCamera2D Method

Use 'BeginCamera2D' as a replacement of SpriteBatch.Begin(SpriteSortMode, BlendState, SamplerState, DepthStencilState, RasterizerState, Effect, Matrix?).

Remarks

Automatically uses the Matrix of the Camera2D component!

Definition

Namespace: MonoGame.Forms.NET.Services
Assembly: MonoGame.Forms.NET (in MonoGame.Forms.NET.dll) Version: 3.2.0

C#

public void BeginCamera2D(
	SpriteSortMode sortMode = SpriteSortMode.Deferred,
	BlendState? blendState = null,
	SamplerState? samplerState = null,
	DepthStencilState? depthStencilState = null,
	RasterizerState? rasterizerState = null,
	Effect? effect = null
)

Parameters

  SpriteSortMode  (Optional)
Defines sprite sort rendering options.
  BlendState  (Optional)
The blend state.
  SamplerState  (Optional)
The sampler state.
  DepthStencilState  (Optional)
The depth stencil state.
  RasterizerState  (Optional)
The rasterizer state.
  Effect  (Optional)
The effect.

See Also

Reference

EditorService Class
MonoGame.Forms.NET.Services Namespace

Clone this wiki locally