Click or drag to resize
AB4D logo

SpriteBatchBegin(BlendState, SamplerState, DepthStencilState, RasterizerState, SpriteEffect) Method

Begin method must be called before any Draw(ShaderResourceView, RectangleF, Boolean, Color4) or Draw(ShaderResourceView, RectangleF, RectangleF, Boolean, Color4) calls. The method sets common properties of all sprites that will be defined by Draw call. After all draw calls are done, the End method must be called.

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.1.9105.2048 (1.0.0.0)
Syntax
C#
public void Begin(
	BlendState blendState = null,
	SamplerState samplerState = null,
	DepthStencilState depthStencilState = null,
	RasterizerState rasterizerState = null,
	SpriteEffect spriteEffect = null
)

Parameters

blendState  BlendState  (Optional)
BlendState
samplerState  SamplerState  (Optional)
SamplerState
depthStencilState  DepthStencilState  (Optional)
DepthStencilState
rasterizerState  RasterizerState  (Optional)
RasterizerState
spriteEffect  SpriteEffect  (Optional)
SpriteEffect (optional)
Remarks

Begin method must be called before any Draw(ShaderResourceView, RectangleF, Boolean, Color4) or Draw(ShaderResourceView, RectangleF, RectangleF, Boolean, Color4) calls. The method sets common properties of all sprites that will be defined by Draw call. After all draw calls are done, the End method must be called.

The default shader states are: blendState: DXDevice.CommonStates.PremultipliedAlphaBlend samplerState: DXDevice.CommonStates.ClampSampler depthStencilState: DXDevice.CommonStates.DepthNone rasterizerState: DXDevice.CommonStates.CullNone

See Also