2019-07-23 06:17:02 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2019-07-23 06:17:02 +00:00
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
2022-08-05 11:36:28 +00:00
|
|
|
using osu.Framework.Graphics.Rendering.Vertices;
|
2019-07-23 06:17:02 +00:00
|
|
|
using osuTK;
|
|
|
|
using osuTK.Graphics;
|
|
|
|
using osuTK.Graphics.ES30;
|
|
|
|
|
|
|
|
namespace osu.Game.Graphics.OpenGL.Vertices
|
|
|
|
{
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
public struct PositionAndColourVertex : IEquatable<PositionAndColourVertex>, IVertex
|
|
|
|
{
|
|
|
|
[VertexMember(2, VertexAttribPointerType.Float)]
|
|
|
|
public Vector2 Position;
|
|
|
|
|
|
|
|
[VertexMember(4, VertexAttribPointerType.Float)]
|
|
|
|
public Color4 Colour;
|
|
|
|
|
|
|
|
public bool Equals(PositionAndColourVertex other)
|
|
|
|
=> Position.Equals(other.Position)
|
|
|
|
&& Colour.Equals(other.Colour);
|
|
|
|
}
|
|
|
|
}
|