This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit b578433e37

View file

@ -0,0 +1,55 @@
using System.Runtime.InteropServices;
namespace Brutal.GliApi;
public static partial class Gli
{
/// <summary>
/// Represent the source of a channel
/// </summary>
public enum Swizzle
{
Red,
Green,
Blue,
Alpha,
Zero,
One,
First = Red,
ChannelFirst = Red,
ChannelLast = Alpha,
Last = One,
}
/// <summary>
/// Implementation of the Gli swizzles
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct Swizzles()
{
/// <summary>
/// The R channel swizzle
/// </summary>
public Swizzle R = Swizzle.Red;
/// <summary>
/// The G channel swizzle
/// </summary>
public Swizzle G = Swizzle.Green;
/// <summary>
/// The B channel swizzle
/// </summary>
public Swizzle B = Swizzle.Blue;
/// <summary>
/// The A channel swizzle
/// </summary>
public Swizzle A = Swizzle.Alpha;
/// <summary>
///
/// </summary>
public static Swizzles Identity => new Swizzles();
}
}