31 lines
863 B
C#
31 lines
863 B
C#
using System.Diagnostics;
|
|
|
|
namespace Quik.VertexGenerator
|
|
{
|
|
/// <summary>
|
|
/// Represents a GPU vertex.
|
|
/// </summary>
|
|
[DebuggerDisplay("XY={Position} RGBA={Color}, UV={TextureCoordinates}")]
|
|
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);
|
|
}
|
|
} |