Export (0) Print
Expand All

SpriteBatch.Begin Method (SpriteBlendMode)

Prepares the graphics device for drawing sprites with specified blending options.

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

public void Begin (
         SpriteBlendMode blendMode
)

Parameters

blendMode
Blending options to use when rendering.

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 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

ADD
Show:
© 2014 Microsoft