Table of Contents

Struct RenderOutputDescription

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Describes the output formats of the Render Targets and the Depth-Stencil Buffer.

[DataContract]
public struct RenderOutputDescription : IEquatable<RenderOutputDescription>
Implements
Inherited Members
Extension Methods

Constructors

RenderOutputDescription(PixelFormat, PixelFormat, MultisampleCount)

Initializes a new instance of the RenderOutputDescription structure.

public RenderOutputDescription(PixelFormat renderTargetFormat, PixelFormat depthStencilFormat = PixelFormat.None, MultisampleCount multisampleCount = MultisampleCount.None)

Parameters

renderTargetFormat PixelFormat

The pixel format of the Render Target. Specify None to disable the Render Targets.

depthStencilFormat PixelFormat

The depth format of the Depth-Stencil Buffer. Specify None to disable the Depth-Stencil Buffer.

multisampleCount MultisampleCount

The number of samples to use when multi-sampling. Specify None to disable multi-sampling.

RenderOutputDescription(ReadOnlySpan<PixelFormat>, PixelFormat, MultisampleCount)

Initializes a new instance of the RenderOutputDescription structure.

public RenderOutputDescription(ReadOnlySpan<PixelFormat> renderTargetFormats, PixelFormat depthStencilFormat = PixelFormat.None, MultisampleCount multisampleCount = MultisampleCount.None)

Parameters

renderTargetFormats ReadOnlySpan<PixelFormat>

The pixel formats for up to 8 Render Targets. If a Render Target is set to None, it is considered disabled. Specify an empty span or all set to None to disable the Render Targets.

depthStencilFormat PixelFormat

The depth format of the Depth-Stencil Buffer. Specify None to disable the Depth-Stencil Buffer.

multisampleCount MultisampleCount

The number of samples to use when multi-sampling. Specify None to disable multi-sampling.

Exceptions

ArgumentOutOfRangeException

Cannot specify the format for more than 8 Render Targets in renderTargetFormats.

Fields

DefaultDepthStencilFormat

Default value for DepthStencilFormat.

public const PixelFormat DefaultDepthStencilFormat = None

Field Value

PixelFormat

DefaultMultiSampleCount

Default value for MultisampleCount.

public const MultisampleCount DefaultMultiSampleCount = None

Field Value

MultisampleCount

DefaultRenderTargetCount

Default value for RenderTargetCount.

public const int DefaultRenderTargetCount = 0

Field Value

int

DefaultRenderTargetFormat

Default value for the Render Targets pixel formats (RenderTargetFormat0 to RenderTargetFormat7).

public const PixelFormat DefaultRenderTargetFormat = None

Field Value

PixelFormat

DefaultScissorTestEnable

Default value for ScissorTestEnable.

public const bool DefaultScissorTestEnable = false

Field Value

bool

DepthStencilFormat

The depth format of the Depth-Stencil Buffer.

public PixelFormat DepthStencilFormat

Field Value

PixelFormat

Remarks

Specify None to disable the Depth-Stencil Buffer.

MaximumRenderTargetCount

The maximum number of Render Targets configurable by the graphics pipeline.

public const int MaximumRenderTargetCount = 8

Field Value

int

MultisampleCount

The number of samples to use when multi-sampling.

public MultisampleCount MultisampleCount

Field Value

MultisampleCount

Remarks

Specify None to disable multi-sampling.

RenderTargetCount

The number of Render Targets.

public int RenderTargetCount

Field Value

int

RenderTargetFormat0

The pixel format of the Render Target at index 0.

public PixelFormat RenderTargetFormat0

Field Value

PixelFormat

RenderTargetFormat1

The pixel format of the Render Target at index 1.

public PixelFormat RenderTargetFormat1

Field Value

PixelFormat

RenderTargetFormat2

The pixel format of the Render Target at index 2.

public PixelFormat RenderTargetFormat2

Field Value

PixelFormat

RenderTargetFormat3

The pixel format of the Render Target at index 3.

public PixelFormat RenderTargetFormat3

Field Value

PixelFormat

RenderTargetFormat4

The pixel format of the Render Target at index 4.

public PixelFormat RenderTargetFormat4

Field Value

PixelFormat

RenderTargetFormat5

The pixel format of the Render Target at index 5.

public PixelFormat RenderTargetFormat5

Field Value

PixelFormat

RenderTargetFormat6

The pixel format of the Render Target at index 6.

public PixelFormat RenderTargetFormat6

Field Value

PixelFormat

RenderTargetFormat7

The pixel format of the Render Target at index 7.

public PixelFormat RenderTargetFormat7

Field Value

PixelFormat

ScissorTestEnable

A value indicating whether to enable scissor-rectangle culling. All pixels ouside an active scissor rectangle are culled.

public bool ScissorTestEnable

Field Value

bool

Properties

RenderTargetFormats

Gets the pixel formats of the Render Targets.

public readonly Span<PixelFormat> RenderTargetFormats { get; }

Property Value

Span<PixelFormat>

Remarks

There is a maximum of eight Render Targets. If a Render Target is set to None, it is considered disabled.

Methods

CaptureState(CommandList)

Captures the description of the pipeline render output from a Command List.

public void CaptureState(CommandList commandList)

Parameters

commandList CommandList

The Command List from which to capture the pipeline render output configuration.

Equals(RenderOutputDescription)

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(RenderOutputDescription other)

Parameters

other RenderOutputDescription

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(RenderOutputDescription, RenderOutputDescription)

public static bool operator ==(RenderOutputDescription left, RenderOutputDescription right)

Parameters

left RenderOutputDescription
right RenderOutputDescription

Returns

bool

operator !=(RenderOutputDescription, RenderOutputDescription)

public static bool operator !=(RenderOutputDescription left, RenderOutputDescription right)

Parameters

left RenderOutputDescription
right RenderOutputDescription

Returns

bool