Dashboard/Quik/VertexGenerator/QuikVertex.cs

31 lines
863 B
C#
Raw Normal View History

2022-08-16 20:35:12 +02:00
using System.Diagnostics;
2022-08-04 15:40:58 +02:00
namespace Quik.VertexGenerator
{
/// <summary>
/// Represents a GPU vertex.
/// </summary>
2022-08-16 20:35:12 +02:00
[DebuggerDisplay("XY={Position} RGBA={Color}, UV={TextureCoordinates}")]
2022-08-04 15:40:58 +02:00
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);
}
}