Table of Contents

Struct RenderTargetBinding

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll

Represents the binding of a RenderTarget2D used in an array of bindings when setting multiple render targets on the graphics device.

public struct RenderTargetBinding
Inherited Members

Constructors

RenderTargetBinding(RenderTarget2D)

Creates a new RenderTargetBinding for the specified render target.

public RenderTargetBinding(RenderTarget2D renderTarget)

Parameters

renderTarget RenderTarget2D

The render target to create the binding for.

Exceptions

ArgumentNullException

The renderTarget parameter is null.

RenderTargetBinding(RenderTargetCube, CubeMapFace)

Creates a new RenderTargetBinding with the specified parameters.

public RenderTargetBinding(RenderTargetCube renderTarget, CubeMapFace cubeMapFace)

Parameters

renderTarget RenderTargetCube

A cube map render target.

cubeMapFace CubeMapFace

The cube map of the render target.

Exceptions

ArgumentNullException

The renderTarget parameter is null.

ArgumentOutOfRangeException

The cubeMapFace parameter is less than PositiveX or greater than NegativeZ.

Properties

ArraySlice

public int ArraySlice { get; }

Property Value

int

RenderTarget

Gets the the render target texture

public Texture RenderTarget { get; }

Property Value

Texture

Operators

implicit operator RenderTargetBinding(RenderTarget2D)

Implicitly converts a RenderTarget2D instance to a RenderTargetBinding instance.

public static implicit operator RenderTargetBinding(RenderTarget2D renderTarget)

Parameters

renderTarget RenderTarget2D

The render target to convert.

Returns

RenderTargetBinding

A new RenderTargetBinding instance bound to the specified render target.