SpriteBatch.Begin Method ()

Prepares the graphics device for drawing sprites.

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

public void Begin ()

Exception typeCondition
InvalidOperationException Begin has been called before calling End after the last call to Begin. Begin cannot be called again until End has been successfully called.

This method must be called before any calls to Draw. When all the sprites have been drawn, call End.

Begin sets the following render states:

Begin sets the following sampler states:

This version of Begin sets SpriteBlendMode to AlphaBlend, SpriteSortMode to Deferred, and SaveStateMode to None. When SaveStateMode is set to None, the caller must reset the render and sampler states if they are used elsewhere.

Xbox 360, Windows XP SP2, Windows Vista

Community Additions