49 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Numerics;
 | |
| using System.Runtime.InteropServices;
 | |
| 
 | |
| namespace Dashboard.Drawing.OpenGL
 | |
| {
 | |
|     public enum SimpleDrawCommand : int
 | |
|     {
 | |
|         Point = 1,
 | |
|         Line = 2,
 | |
|         Rect = 3,
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Make sure your custom commands have values higher than this if you plan on using the default command
 | |
|         /// buffer.
 | |
|         /// </summary>
 | |
|         CustomCommandStart = 4096
 | |
|     }
 | |
| 
 | |
|     [StructLayout(LayoutKind.Explicit, Size = 64)]
 | |
|     public struct CommandInfo
 | |
|     {
 | |
|         [FieldOffset(0)]
 | |
|         public SimpleDrawCommand Type;
 | |
| 
 | |
|         [FieldOffset(4)]
 | |
|         public int Flags;
 | |
| 
 | |
|         [FieldOffset(8)]
 | |
|         public float Arg0;
 | |
|         [FieldOffset(12)]
 | |
|         public float Arg1;
 | |
| 
 | |
|         [FieldOffset(16)]
 | |
|         public int FgGradientIndex;
 | |
|         [FieldOffset(20)]
 | |
|         public int FgGradientCount;
 | |
|         [FieldOffset(24)]
 | |
|         public int BgGradientIndex;
 | |
|         [FieldOffset(28)]
 | |
|         public int BgGradientCount;
 | |
| 
 | |
|         [FieldOffset(32)]
 | |
|         public Vector4 FgColor;
 | |
| 
 | |
|         [FieldOffset(48)]
 | |
|         public Vector4 BgColor;
 | |
|     }
 | |
| }
 |