The sprite batch used by the Vertices Engine to measure and count Batch Calls. This is mostly for profiling and organization as well as allows for extention methods to be created.
More...
|
| vxSpriteBatch (GraphicsDevice graphicsDevice) |
| Sprite batch.
|
|
void | Begin (string batchCall, SpriteSortMode sortMode=SpriteSortMode.Deferred, BlendState blendState=null, SamplerState samplerState=null, DepthStencilState depthStencilState=null, RasterizerState rasterizerState=null, Effect effect=null, Matrix? transformMatrix=default(Matrix?)) |
| Begins a new sprite and text batch with the specified render state.
|
|
new void | End () |
|
void | DrawString (SpriteFont font, string text, Vector2 position, Color color, float scale, vxHorizontalJustification horizontalJustification=vxHorizontalJustification.Left, vxVerticalJustification verticalJustification=vxVerticalJustification.Top, float rotation=0) |
|
void | DrawString (SpriteFont font, string text, Vector2 position, Color color, float scale, Vector2 origin) |
|
|
List< string > | BatchCallNames = new List<string>(1024) |
|
|
int | BatchCallCount [get] |
| The batch call count.
|
|
The sprite batch used by the Vertices Engine to measure and count Batch Calls. This is mostly for profiling and organization as well as allows for extention methods to be created.
◆ vxSpriteBatch()
VerticesEngine.Graphics.vxSpriteBatch.vxSpriteBatch |
( |
GraphicsDevice | graphicsDevice | ) |
|
◆ Begin()
void VerticesEngine.Graphics.vxSpriteBatch.Begin |
( |
string | batchCall, |
|
|
SpriteSortMode | sortMode = SpriteSortMode::Deferred, |
|
|
BlendState | blendState = null, |
|
|
SamplerState | samplerState = null, |
|
|
DepthStencilState | depthStencilState = null, |
|
|
RasterizerState | rasterizerState = null, |
|
|
Effect | effect = null, |
|
|
Matrix? | transformMatrix = default(Matrix?) ) |
Begins a new sprite and text batch with the specified render state.
- Parameters
-
sortMode | The drawing order for sprite and text drawing. F:Microsoft.Xna.Framework.Graphics.SpriteSortMode.Deferred by default. |
blendState | State of the blending. Uses F:Microsoft.Xna.Framework.Graphics.BlendState.AlphaBlend if null. |
samplerState | State of the sampler. Uses F:Microsoft.Xna.Framework.Graphics.SamplerState.LinearClamp if null. |
depthStencilState | State of the depth-stencil buffer. Uses F:Microsoft.Xna.Framework.Graphics.DepthStencilState.None if null. |
rasterizerState | State of the rasterization. Uses F:Microsoft.Xna.Framework.Graphics.RasterizerState.CullCounterClockwise if null. |
effect | A custom T:Microsoft.Xna.Framework.Graphics.Effect to override the default sprite effect. Uses default sprite effect if null. |
transformMatrix | An optional matrix used to transform the sprite geometry. Uses P:Microsoft.Xna.Framework.Matrix.Identity if null. |
- Exceptions
-
T:System.InvalidOperationException | Thrown if M:Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin(Microsoft.Xna.Framework.Graphics.SpriteSortMode,Microsoft.Xna.Framework.Graphics.BlendState,Microsoft.Xna.Framework.Graphics.SamplerState,Microsoft.Xna.Framework.Graphics.DepthStencilState,Microsoft.Xna.Framework.Graphics.RasterizerState,Microsoft.Xna.Framework.Graphics.Effect,System.Nullable<Microsoft.Xna.Framework.Matrix>) is called next time without previous M:Microsoft.Xna.Framework.Graphics.SpriteBatch.End. |
This method uses optional parameters.
The M:Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin(Microsoft.Xna.Framework.Graphics.SpriteSortMode,Microsoft.Xna.Framework.Graphics.BlendState,Microsoft.Xna.Framework.Graphics.SamplerState,Microsoft.Xna.Framework.Graphics.DepthStencilState,Microsoft.Xna.Framework.Graphics.RasterizerState,Microsoft.Xna.Framework.Graphics.Effect,System.Nullable<Microsoft.Xna.Framework.Matrix>) Begin should be called before drawing commands, and you cannot call it again before subsequent M:Microsoft.Xna.Framework.Graphics.SpriteBatch.End.
The documentation for this class was generated from the following file:
- /github/workspace/src/VerticesEngine/src.shared/Graphics/vxSpriteBatch.cs