A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using System;
5using System.Runtime.InteropServices;
6using osuTK.Graphics.ES30;
7
8namespace osu.Framework.Graphics.OpenGL.Vertices
9{
10 [StructLayout(LayoutKind.Sequential)]
11 internal struct DepthWrappingVertex<TVertex> : IVertex, IEquatable<DepthWrappingVertex<TVertex>>
12 where TVertex : struct, IVertex, IEquatable<TVertex>
13 {
14 public TVertex Vertex;
15
16 [VertexMember(1, VertexAttribPointerType.Float)]
17 public float BackbufferDrawDepth;
18
19 public readonly bool Equals(DepthWrappingVertex<TVertex> other)
20 => Vertex.Equals(other.Vertex)
21 && BackbufferDrawDepth.Equals(other.BackbufferDrawDepth);
22 }
23}