Skip to content

GraphicsAPI reference

Struct RenderTargetDescription

Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device

An offscreen target: one colour texture that can also be sampled, and an optional depth(-stencil) texture.

C#
public readonly struct RenderTargetDescription : IEquatable<RenderTargetDescription>

Implements

IEquatable<RenderTargetDescription>

Constructors

RenderTargetDescription(int, int, TextureFormat, TextureFormat?, string?)

An offscreen target: one colour texture that can also be sampled, and an optional depth(-stencil) texture.

C#
public RenderTargetDescription(int Width, int Height, TextureFormat Format = TextureFormat.Rgba8Unorm, TextureFormat? Depth = null, string? Name = null)

Parameters

Width int

Width in pixels, 1..MaxRenderTargetSize.

Height int

Height in pixels, 1..MaxRenderTargetSize.

Format TextureFormat

Colour format; must support RenderTarget and Sampled.

Depth TextureFormat?

Depth format, or null; requires DepthBuffer and DepthStencil support for the format.

Name string?

Debug name.

Properties

Depth

Depth format, or null; requires DepthBuffer and DepthStencil support for the format.

C#
public TextureFormat? Depth { get; init; }

Property Value

TextureFormat?

Format

Colour format; must support RenderTarget and Sampled.

C#
public TextureFormat Format { get; init; }

Property Value

TextureFormat

Height

Height in pixels, 1..MaxRenderTargetSize.

C#
public int Height { get; init; }

Property Value

int

Name

Debug name.

C#
public string? Name { get; init; }

Property Value

string?

Width

Width in pixels, 1..MaxRenderTargetSize.

C#
public int Width { get; init; }

Property Value

int

Methods

Deconstruct(out int, out int, out TextureFormat, out TextureFormat?, out string?)

C#
public void Deconstruct(out int Width, out int Height, out TextureFormat Format, out TextureFormat? Depth, out string? Name)

Parameters

Width int

Height int

Format TextureFormat

Depth TextureFormat?

Name string?

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(RenderTargetDescription)

C#
public bool Equals(RenderTargetDescription other)

Parameters

other RenderTargetDescription

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(RenderTargetDescription, RenderTargetDescription)

C#
public static bool operator ==(RenderTargetDescription left, RenderTargetDescription right)

Parameters

left RenderTargetDescription

right RenderTargetDescription

Returns

bool

operator !=(RenderTargetDescription, RenderTargetDescription)

C#
public static bool operator !=(RenderTargetDescription left, RenderTargetDescription right)

Parameters

left RenderTargetDescription

right RenderTargetDescription

Returns

bool