mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 20:12:23 +00:00
* Fix BoundingRect unit tests. * Create `graphics` library.
40 lines
2.1 KiB
C#
40 lines
2.1 KiB
C#
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
namespace MonoGame.Extended.Graphics.Batching
|
|
{
|
|
/// <summary>
|
|
/// Defines options for how geometric objects are submitted to a <see cref="GraphicsDevice" />.
|
|
/// </summary>
|
|
public enum BatchSortMode : byte
|
|
{
|
|
/// <summary>
|
|
/// Each <see cref="Batch{TVertexType,TBatchDrawCommandData}.Draw" /> call invokes
|
|
/// <see cref="GraphicsDevice.DrawIndexedPrimitives(PrimitiveType, int, int, int)" /> immediately for each
|
|
/// <see cref="EffectPass" />.
|
|
/// </summary>
|
|
Immediate,
|
|
|
|
/// <summary>
|
|
/// Each <see cref="Batch{TVertexType,TBatchDrawCommandData}.Draw" /> call is added to the end of an array of draw
|
|
/// commands. Draw commands will be merged, if possible, for batching. When
|
|
/// <see cref="Batch{TVertexType,TBatchDrawCommandData}.Flush" /> or
|
|
/// <see cref="Batch{TVertexType,TBatchDrawCommandData}.End" /> is called, the merged draw commands will be processed
|
|
/// on a first come, first serve, basis where each command invokes
|
|
/// <see cref="GraphicsDevice.DrawIndexedPrimitives(PrimitiveType, int, int, int)" /> for each
|
|
/// <see cref="EffectPass" />.
|
|
/// </summary>
|
|
Deferred,
|
|
|
|
/// <summary>
|
|
/// Each <see cref="Batch{TVertexType,TBatchDrawCommandData}.Draw" /> call is added to the end of an array of draw
|
|
/// commands. Draw commands will be merged, if possible, for batching as are they called and after they are sorted in
|
|
/// ascending order by their sort keys. When
|
|
/// <see cref="Batch{TVertexType,TBatchDrawCommandData}.Flush" /> or
|
|
/// <see cref="Batch{TVertexType,TBatchDrawCommandData}.End" /> is called, the sorting takes place and then the merged
|
|
/// draw commands are processed where each command invokes
|
|
/// <see cref="GraphicsDevice.DrawIndexedPrimitives(PrimitiveType, int, int, int)" /> for each
|
|
/// <see cref="EffectPass" />.
|
|
/// </summary>
|
|
DeferredSorted
|
|
}
|
|
} |