Due to unforseen naming conflicts, the project has been rebranded under the ReFuel umbrealla and will now be referred to as Dashboard from now on. Other changes will occur to suit the library more for the engine whilst keeping the freestanding nature of the library. Rename folder. Rename to Dashboard.OpenTK Rename to Dashboard.Media.Defaults. Do the last renames and path fixes.
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System.Diagnostics;
|
|
|
|
namespace Dashboard.VertexGenerator
|
|
{
|
|
/// <summary>
|
|
/// Represents a GPU vertex.
|
|
/// </summary>
|
|
[DebuggerDisplay("XY={Position} RGBA={Color}, UV={TextureCoordinates}")]
|
|
public struct QuikVertex
|
|
{
|
|
/// <summary>
|
|
/// Position value.
|
|
/// </summary>
|
|
public QVec2 Position;
|
|
|
|
/// <summary>
|
|
/// Texture Coordinates.
|
|
/// </summary>
|
|
public QVec2 TextureCoordinates;
|
|
|
|
/// <summary>
|
|
/// Per vertex color value.
|
|
/// </summary>
|
|
public QColor Color;
|
|
|
|
/// <summary>
|
|
/// Per vertex depth index value.
|
|
/// </summary>
|
|
public int ZIndex;
|
|
|
|
/// <summary>
|
|
/// The texture layer to draw for 3d images.
|
|
/// </summary>
|
|
public float TextureLayer;
|
|
|
|
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 TextureLayerOffset => ZIndexOffset + sizeof(int);
|
|
public static unsafe int Stride => sizeof(QuikVertex);
|
|
}
|
|
} |