Beispiel #1
0
 /// <summary>
 /// Begins a sprite batch rendering using the specified sorting mode and blend state, sampler, depth stencil, rasterizer state objects, plus a custom effect and a 2D transformation matrix. Passing null for any of the state objects selects the default default state objects (BlendState.AlphaBlend, DepthStencilState.Default, RasterizerState.CullCounterClockwise, SamplerState.LinearClamp). Passing a null effect selects the default SpriteBatch Class shader.
 /// </summary>
 /// <param name="graphicsContext">The graphics context to use.</param>
 /// <param name="viewMatrix">The view matrix to use for the batch session</param>
 /// <param name="sortMode">The sprite drawing order to use for the batch session</param>
 /// <param name="blendState">The blending state to use for the batch session</param>
 /// <param name="samplerState">The sampling state to use for the batch session</param>
 /// <param name="depthStencilState">The depth stencil state to use for the batch session</param>
 /// <param name="rasterizerState">The rasterizer state to use for the batch session</param>
 /// <param name="effect">The effect to use for the batch session</param>
 /// <param name="stencilValue">The value of the stencil buffer to take as reference for the batch session</param>
 public void Begin(GraphicsContext graphicsContext, Matrix viewMatrix, SpriteSortMode sortMode = SpriteSortMode.Deferred, BlendStateDescription?blendState = null, SamplerState samplerState = null, DepthStencilStateDescription?depthStencilState = null, RasterizerStateDescription?rasterizerState = null, EffectInstance effect = null, int stencilValue = 0)
 {
     UpdateDefaultProjectionMatrix(graphicsContext.CommandList);
     Begin(graphicsContext, viewMatrix, defaultProjectionMatrix, sortMode, blendState, samplerState, depthStencilState, rasterizerState, effect, stencilValue);
 }