Table of Contents

Struct GraphicsExtensions.TargetContext

Namespace
MLEM.Graphics
Assembly
MLEM.dll

Represents a context in which a Microsoft.Xna.Framework.Graphics.RenderTarget2D is applied. This class should be used with WithRenderTarget(GraphicsDevice, RenderTarget2D).

public readonly struct GraphicsExtensions.TargetContext : IDisposable
Implements
Inherited Members

Constructors

TargetContext(GraphicsDevice, RenderTarget2D)

Creates a new target context with the given settings.

public TargetContext(GraphicsDevice device, RenderTarget2D target)

Parameters

device GraphicsDevice

The graphics device to apply the target on

target RenderTarget2D

The target to apply

TargetContext(GraphicsDevice, RenderTargetBinding[])

Creates a new target context with the given settings.

public TargetContext(GraphicsDevice device, RenderTargetBinding[] targets)

Parameters

device GraphicsDevice

The graphics device to apply the target on

targets RenderTargetBinding[]

The targets to apply

Methods

Dispose()

Disposes this target context, which causes the graphics device's previous render targets to be re-applied.

public void Dispose()