Dashboard/Quik/VertexGenerator/QuikVertex.cs

30 lines
799 B
C#

using System.Runtime.CompilerServices;
namespace Quik.VertexGenerator
{
/// <summary>
/// Represents a GPU vertex.
/// </summary>
public struct QuikVertex
{
/// <summary>
/// Position value.
/// </summary>
public QuikVec2 Position;
/// <summary>
/// Texture Coordinates.
/// </summary>
public QuikVec2 TextureCoordinates;
/// <summary>
/// Per vertex color value.
/// </summary>
public QuikColor Color;
public static int PositionOffset => 0;
public static unsafe int TextureCoordinatesOffset => sizeof(QuikVec2);
public static unsafe int ColorOffset => 2 * sizeof(QuikVec2);
public static unsafe int Stride => sizeof(QuikVertex);
}
}