File: VertexPosition2ColorTexture.cs

package info (click to toggle)
monogame 2.5.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,060 kB
  • ctags: 10,325
  • sloc: cs: 65,996; xml: 591; makefile: 22; ansic: 8
file content (32 lines) | stat: -rw-r--r-- 757 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Runtime.InteropServices;

namespace Microsoft.Xna.Framework.Graphics
{
	[StructLayout(LayoutKind.Sequential, Pack=1)]
	// This should really be XNA's VertexPositionColorTexture
	// but I'm not sure we want to use Vector3s if we don't have to.
	internal struct VertexPosition2ColorTexture
	{
		public Vector2 Position;
		public uint Color;
		
		public Vector2 TextureCoordinate;
		
		public VertexPosition2ColorTexture ( Vector2 position, Color color, Vector2 texCoord )
		{
			Position = position;
			Color = color.GLPackedValue;
			TextureCoordinate = texCoord;
		}
		
		public static int GetSize()
		{
				return sizeof(float)*4+sizeof(uint);
	    }
	}
}