コード例 #1
0
ファイル: UIBatch.cs プロジェクト: Aggror/Stride
 /// <summary>
 /// Begins a image batch rendering using the specified blend state, depth stencil and a view-projection transformation matrix.
 /// Passing null for any of the state objects selects the default default state objects (BlendState.AlphaBlend, DepthStencilState.None).
 /// </summary>
 /// <param name="graphicsContext">The graphics context to use.</param>
 /// <param name="viewProjection">The view projection matrix used for this series of draw calls</param>
 /// <param name="blendState">Blending options.</param>
 /// <param name="depthStencilState">Depth and stencil options.</param>
 /// <param name="stencilValue">The value of the stencil buffer to take as reference</param>
 public void Begin(GraphicsContext graphicsContext, ref Matrix viewProjection, BlendStateDescription?blendState, DepthStencilStateDescription?depthStencilState, int stencilValue)
 {
     Begin(graphicsContext, ref viewProjection, blendState, null, null, depthStencilState, stencilValue);
 }
コード例 #2
0
ファイル: SpriteBatch.cs プロジェクト: Alan-love/xenko
 /// <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);
 }
コード例 #3
0
 /// <summary>
 /// Draws a quad with a texture. This Draw method is using the current effect bound to this instance.
 /// </summary>
 /// <param name="texture">The texture.</param>
 /// <param name="applyEffectStates">The flag to apply effect states.</param>
 public void Draw(GraphicsContext graphicsContext, Texture texture, BlendStateDescription?blendState = null)
 {
     Draw(graphicsContext, texture, null, Color.White, blendState);
 }
コード例 #4
0
ファイル: SpriteBatch.cs プロジェクト: Alan-love/xenko
 /// <summary>
 /// Begins a sprite batch operation using deferred sort and default state objects (BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullCounterClockwise).
 /// </summary>
 /// <param name="graphicsContext">The graphics context to use.</param>
 /// <param name="sortMode">The sprite drawing order to use for the batch session</param>
 /// <param name="effect">The effect to use for the batch session</param>
 public void Begin(GraphicsContext graphicsContext, SpriteSortMode sortMode, EffectInstance effect)
 {
     UpdateDefaultProjectionMatrix(graphicsContext.CommandList);
     Begin(graphicsContext, defaultViewMatrix, defaultProjectionMatrix, sortMode, null, null, null, null, effect);
 }