using System.Diagnostics; namespace Quik.VertexGenerator { /// /// Represents a GPU vertex. /// [DebuggerDisplay("XY={Position} RGBA={Color}, UV={TextureCoordinates}")] public struct QuikVertex { /// /// Position value. /// public QVec2 Position; /// /// Texture Coordinates. /// public QVec2 TextureCoordinates; /// /// Per vertex color value. /// public QColor Color; /// /// Per vertex depth index value. /// public int ZIndex; public static int PositionOffset => 0; public static unsafe int TextureCoordinatesOffset => sizeof(QVec2); public static unsafe int ColorOffset => 2 * sizeof(QVec2); public static unsafe int ZIndexOffset => ColorOffset + sizeof(QColor); public static unsafe int Stride => sizeof(QuikVertex); } }