DrawVertDeclaration.cs 814 B

1234567891011121314151617181920212223242526272829
  1. using Microsoft.Xna.Framework.Graphics;
  2. namespace OpenVIII.Core
  3. {
  4. public static class DrawVertDeclaration
  5. {
  6. public static readonly VertexDeclaration Declaration;
  7. public static readonly int Size;
  8. static DrawVertDeclaration()
  9. {
  10. unsafe { Size = sizeof(ImGuiNET.ImDrawVert); }
  11. Declaration = new VertexDeclaration(
  12. Size,
  13. // Position
  14. new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0),
  15. // UV
  16. new VertexElement(8, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0),
  17. // Color
  18. new VertexElement(16, VertexElementFormat.Color, VertexElementUsage.Color, 0)
  19. );
  20. }
  21. }
  22. }