Implement Constant Color blends (#1119)
* Implement Constant Color blends and init blend states * Address gdkchan's comments Also adds Set methods to GpuState * Fix descriptions of QueryModified
This commit is contained in:
parent
75ec30c962
commit
a728610b40
10 changed files with 140 additions and 16 deletions
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
|
||||
namespace Ryujinx.Graphics.GAL
|
||||
{
|
||||
public struct ColorF
|
||||
public struct ColorF : IEquatable<ColorF>
|
||||
{
|
||||
public float Red { get; }
|
||||
public float Green { get; }
|
||||
|
@ -14,5 +16,17 @@ namespace Ryujinx.Graphics.GAL
|
|||
Blue = blue;
|
||||
Alpha = alpha;
|
||||
}
|
||||
|
||||
public bool Equals(ColorF color) => Red == color.Red &&
|
||||
Green == color.Green &&
|
||||
Blue == color.Blue &&
|
||||
Alpha == color.Alpha;
|
||||
|
||||
public override bool Equals(object obj) => (obj is ColorF color) && Equals(color);
|
||||
|
||||
public override int GetHashCode() => HashCode.Combine(Red, Green, Blue, Alpha);
|
||||
|
||||
public static bool operator ==(ColorF l, ColorF r) => l.Equals(r);
|
||||
public static bool operator !=(ColorF l, ColorF r) => !l.Equals(r);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue