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;
7using osuTK.Graphics;
8using osuTK.Graphics.ES30;
9
10namespace osu.Framework.Graphics.OpenGL.Vertices
11{
12 [StructLayout(LayoutKind.Sequential)]
13 public struct TimedTexturedVertex2D : IEquatable<TimedTexturedVertex2D>, IVertex
14 {
15 [VertexMember(2, VertexAttribPointerType.Float)]
16 public Vector2 Position;
17
18 [VertexMember(4, VertexAttribPointerType.Float)]
19 public Color4 Colour;
20
21 [VertexMember(2, VertexAttribPointerType.Float)]
22 public Vector2 TexturePosition;
23
24 [VertexMember(1, VertexAttribPointerType.Float)]
25 public float Time;
26
27 public readonly bool Equals(TimedTexturedVertex2D other) => Position.Equals(other.Position) && TexturePosition.Equals(other.TexturePosition) && Colour.Equals(other.Colour) && Time.Equals(other.Time);
28 }
29}