// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osuTK.Graphics.ES30; namespace osu.Framework.Graphics.OpenGL { /// /// Information for how depth should be handled. /// public readonly struct DepthInfo : IEquatable { /// /// The default depth properties, as defined by OpenGL. /// public static DepthInfo Default => new DepthInfo(true); /// /// Whether depth testing should occur. /// public readonly bool DepthTest; /// /// Whether to write to the depth buffer if the depth test passed. /// public readonly bool WriteDepth; /// /// The depth test function. /// public readonly DepthFunction Function; public DepthInfo(bool depthTest = true, bool writeDepth = true, DepthFunction function = DepthFunction.Less) { DepthTest = depthTest; WriteDepth = writeDepth; Function = function; } public bool Equals(DepthInfo other) => DepthTest == other.DepthTest && WriteDepth == other.WriteDepth && Function == other.Function; } }