Export (0) Print
Expand All

SpriteBatch.Begin Method (SpriteSortMode, BlendState)

Begins a sprite batch operation using the specified sort and blend state object and default state objects (DepthStencilState.None, SamplerState.LinearClamp, RasterizerState.CullCounterClockwise). If you pass a null blend state, the default is BlendState.AlphaBlend.

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

public void Begin (
         SpriteSortMode sortMode,
         BlendState blendState


Type: SpriteSortMode
Sprite drawing order.
Type: BlendState
Blending options.

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.

Xbox 360, Windows 7, Windows Vista, Windows XP

Community Additions

© 2014 Microsoft