mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 06:28:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
55
Brutal.Gli/Types/Swizzle.cs
Normal file
55
Brutal.Gli/Types/Swizzle.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue