/// <summary> /// Constructs the <see cref="SpriteBatch"/>. /// </summary> /// <param name="graphicsDevice">The <see cref="GraphicsDevice"/> which will be used for sprite rendering.</param> /// <exception cref="ArgumentNullException"><paramref name="graphicsDevice"/> is null.</exception> public SpriteBatch(GraphicsDevice graphicsDevice) : base(graphicsDevice) { _batcher = new SpriteBatcher(GraphicsDevice); SpriteEffect = new SpriteEffect(GraphicsDevice); _spritePass = SpriteEffect.CurrentTechnique.Passes[0]; _beginCalled = false; }
/// <summary> /// Creates a new <see cref="SpriteEffect"/> by /// cloning parameter settings from an existing instance. /// </summary> protected SpriteEffect(SpriteEffect cloneSource) : base(cloneSource) { _matrixParam = Parameters["MatrixTransform"]; }