4using Microsoft.Xna.Framework;
5using Microsoft.Xna.Framework.Graphics;
52 AddressU = TextureAddressMode.Clamp,
53 AddressW = TextureAddressMode.Clamp,
54 AddressV = TextureAddressMode.Clamp,
61 vertexBuffer =
new VertexPositionColor[vertexBufferSize];
90 for (
int i = 0; i <
effect.CurrentTechnique.Passes.Count; i++ )
91 effect.CurrentTechnique.Passes[i].Apply();
94 PrimitiveType.TriangleList,
113 Matrix.CreateScale( size.X, size.Y, 1f )
114 *
Matrix.CreateRotationZ( angle )
115 *
Matrix.CreateTranslation( position.X, position.Y, 0 )
120 for (
int i = 0; i < vertices.Length; i++ )
123 Vector3 p3 =
new Vector3( (
float)p.
X, (
float)p.
Y, 0f );
129 for (
int i = 0; i < indices.Length; i++ )
System.Numerics.Vector2 Vector2
static new GraphicsDevice GraphicsDevice
XNA:n grafiikkakortti.
Contains graphics resources.
static Effect GetColorEffect(ref Matrix worldMatrix, bool lightingEnabled)
Draws simple shapes efficiently. Draw() calls should be made only between Begin() and End() calls....
SamplerState samplerState
const int DefaultBufferSize
void Begin(ref Matrix matrix)
void Draw(Vector[] vertices, Int16[] indices, Color color, Vector2 position, Vector2 size, float angle)
Int16[] indexBuffer
Buffer for index values to the vertex buffer.
VertexPositionColor[] vertexBuffer
Microsoft.Xna.Framework.Matrix Matrix
double Y
Vektorin Y-komponentti
double X
Vektorin X-komponentti.