SpriteBatch Constructor
Initializes a new instance of the class, which enables a group of sprites to be drawn using the same settings.
Syntax
'Declaration
Public Sub New ( _
graphicsDevice As GraphicsDevice _
)
public SpriteBatch (
GraphicsDevice graphicsDevice
)
public:
SpriteBatch(
GraphicsDevice graphicsDevice
)
Parameters
- graphicsDevice
Type: GraphicsDevice
The graphics device where sprites will be drawn.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | graphicsDevice is null. |
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Reference
SpriteBatch Class
SpriteBatch Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone