Skip to content

4320CBFF

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

EndRenderTarget Method

Everything between BeginRenderTarget() and EndRenderTarget() will be drawn to the RenderTarget2D.

Definition

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

C#

public RenderTarget2D EndRenderTarget(
	string key,
	bool drawToSpriteBatch = true,
	bool clearGraphics = true,
	Color? clearColor = null,
	ClearOptions clearOptions = ClearOptions.Target|ClearOptions.DepthBuffer|ClearOptions.Stencil,
	float depth = 1f,
	int stencil = 0
)

Parameters

  String
Please enter a previously set key of the RenderTarget2D you want to end.
  Boolean  (Optional)
true to automatically draw the result to the SpriteBatch.
  Boolean  (Optional)
false if you don't want to to call GraphicsDevice.Clear() after setting the RenderTarget2D.
  Nullable(Color)  (Optional)
The Color to be used to clear the GraphicsDevice after setting the RenderTarget2D.
  ClearOptions  (Optional)
Define your custom ClearOptions.
  Single  (Optional)
The depth.
  Int32  (Optional)
The stencil

Return Value

RenderTarget2D
The resulting RenderTarget2D.

See Also

Reference

EditorService Class
MonoGame.Forms.NET.Services Namespace

Clone this wiki locally