mirror of
https://github.com/AlexMacocian/MonoGame.ImGuiNet.git
synced 2026-07-24 03:56:29 +00:00
29 lines
751 B
C#
29 lines
751 B
C#
using Microsoft.Xna.Framework.Graphics;
|
|
using ImGuiNET;
|
|
|
|
namespace MonoGame.ImGuiNet;
|
|
|
|
public static class DrawVertDeclaration
|
|
{
|
|
public static readonly VertexDeclaration Declaration;
|
|
|
|
public static readonly int Size;
|
|
|
|
static DrawVertDeclaration()
|
|
{
|
|
unsafe { Size = sizeof(ImDrawVert); }
|
|
|
|
Declaration = new VertexDeclaration(
|
|
Size,
|
|
|
|
// Position
|
|
new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0),
|
|
|
|
// UV
|
|
new VertexElement(8, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0),
|
|
|
|
// Color
|
|
new VertexElement(16, VertexElementFormat.Color, VertexElementUsage.Color, 0)
|
|
);
|
|
}
|
|
} |