mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2025-10-31 21:50:44 +07:00
28 lines
817 B
C#
28 lines
817 B
C#
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
namespace ImGuiNET.SampleProgram.XNA
|
|
{
|
|
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)
|
|
);
|
|
}
|
|
}
|
|
} |