public SpriteBatch(GraphicsDevice graphicsDevice) { if (graphicsDevice == null) { throw new ArgumentNullException("graphicsDevice"); } GraphicsDevice = graphicsDevice; vertexInfo = new VertexPositionColorTexture[MAX_VERTICES]; spriteData = new SpriteInfo[MAX_SPRITES]; vertexBuffer = new DynamicVertexBuffer( graphicsDevice, typeof(VertexPositionColorTexture), MAX_VERTICES, BufferUsage.WriteOnly ); indexBuffer = new DynamicIndexBuffer( graphicsDevice, IndexElementSize.SixteenBits, MAX_INDICES, BufferUsage.WriteOnly ); indexBuffer.SetData(indexData); spriteEffect = new Effect( graphicsDevice, spriteEffectCode ); spriteMatrixTransform = spriteEffect.Parameters["MatrixTransform"]; spriteEffectPass = spriteEffect.CurrentTechnique.Passes[0]; beginCalled = false; numSprites = 0; }
public void SetVertexBuffer(DynamicVertexBuffer dynamicVertexBuffer) { }