GraphicsAPI reference
Struct Vertex2D
Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device
The vertex of the built-in pipeline (Textured), 32 bytes: position in target pixels relative to the viewport origin (y down), texture coordinate normalised to 0..1 over the bound texture, premultiplied colour that multiplies the texel. The layout is fixed and identical on every tier: Vertex2D.
public readonly struct Vertex2D : IEquatable<Vertex2D>Implements
Constructors
Vertex2D(Vector2, Vector2, ColorF)
The vertex of the built-in pipeline (Textured), 32 bytes: position in target pixels relative to the viewport origin (y down), texture coordinate normalised to 0..1 over the bound texture, premultiplied colour that multiplies the texel. The layout is fixed and identical on every tier: Vertex2D.
public Vertex2D(Vector2 Position, Vector2 TexCoord, ColorF Color)Parameters
Position Vector2
Pixels, relative to the viewport origin, y down. Pixel (x, y) has its centre at (x + 0.5, y + 0.5).
TexCoord Vector2
Normalised texture coordinate; (0, 0) is the top-left corner of texel (0, 0).
Color ColorF
Premultiplied colour multiplied with the sampled texel.
Fields
SizeInBytes
Size of one vertex in bytes (the stride of every built-in vertex buffer).
public const int SizeInBytes = 32Field Value
Properties
Color
Premultiplied colour multiplied with the sampled texel.
public ColorF Color { get; init; }Property Value
Position
Pixels, relative to the viewport origin, y down. Pixel (x, y) has its centre at (x + 0.5, y + 0.5).
public Vector2 Position { get; init; }Property Value
TexCoord
Normalised texture coordinate; (0, 0) is the top-left corner of texel (0, 0).
public Vector2 TexCoord { get; init; }Property Value
Methods
Deconstruct(out Vector2, out Vector2, out ColorF)
public void Deconstruct(out Vector2 Position, out Vector2 TexCoord, out ColorF Color)Parameters
Position Vector2
TexCoord Vector2
Color ColorF
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(Vertex2D)
public bool Equals(Vertex2D other)Parameters
other Vertex2D
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(Vertex2D, Vertex2D)
public static bool operator ==(Vertex2D left, Vertex2D right)Parameters
left Vertex2D
right Vertex2D
Returns
operator !=(Vertex2D, Vertex2D)
public static bool operator !=(Vertex2D left, Vertex2D right)Parameters
left Vertex2D
right Vertex2D