mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
55 lines
1.1 KiB
C#
55 lines
1.1 KiB
C#
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();
|
|
}
|
|
}
|