Skip to content

GraphicsAPI reference

Class VertexLayout

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

Interleaved vertex layout of one vertex buffer (slot 0).

C#
public sealed record VertexLayout : IEquatable<VertexLayout>

Inheritance

object ← VertexLayout

Implements

IEquatable<VertexLayout>

Constructors

VertexLayout(int, IReadOnlyList<VertexAttribute>)

Interleaved vertex layout of one vertex buffer (slot 0).

C#
public VertexLayout(int Stride, IReadOnlyList<VertexAttribute> Attributes)

Parameters

Stride int

Bytes per vertex.

Attributes IReadOnlyList<VertexAttribute>

Attributes, at most MaxVertexAttributes.

Fields

Vertex2D

The layout of Vertex2D: position Float2 @0, texcoord Float2 @8, colour Float4 @16, stride 32.

C#
public static readonly VertexLayout Vertex2D

Field Value

VertexLayout

Properties

Attributes

Attributes, at most MaxVertexAttributes.

C#
public IReadOnlyList<VertexAttribute> Attributes { get; init; }

Property Value

IReadOnlyList<VertexAttribute>

Stride

Bytes per vertex.

C#
public int Stride { get; init; }

Property Value

int

Methods

<Clone>$()

C#
public VertexLayout <Clone>$()

Returns

VertexLayout

Deconstruct(out int, out IReadOnlyList<VertexAttribute>)

C#
public void Deconstruct(out int Stride, out IReadOnlyList<VertexAttribute> Attributes)

Parameters

Stride int

Attributes IReadOnlyList<VertexAttribute>

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(VertexLayout?)

C#
public bool Equals(VertexLayout? other)

Parameters

other VertexLayout?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(VertexLayout?, VertexLayout?)

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

Parameters

left VertexLayout?

right VertexLayout?

Returns

bool

operator !=(VertexLayout?, VertexLayout?)

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

Parameters

left VertexLayout?

right VertexLayout?

Returns

bool