Share via


SpriteBatch Constructor

Initializes a new instance of the class, which enables a group of sprites to be drawn using the same settings.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public SpriteBatch (
         GraphicsDevice graphicsDevice
)

Parameters

  • graphicsDevice
    The graphics device where sprites will be drawn.

Exceptions

Exception type Condition
ArgumentNullException graphicsDevice is null.

See Also

Tasks

How to: Draw a Sprite

Concepts

2D Graphics Overview

Reference

SpriteBatch Class
SpriteBatch Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista