recrownedgtk/RecrownedAthenaeum/Render/SpriteBatchSettings.cs

62 lines
1.6 KiB
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RecrownedAthenaeum.Render
{
/// <summary>
/// The settings the sprite batch should use.
/// </summary>
public struct SpriteBatchSettings
{
/// <summary>
/// Defines sprites sort mode.
/// </summary>
public SpriteSortMode spriteSortMode;
/// <summary>
/// The blend state to use.
/// </summary>
public BlendState blendState;
/// <summary>
/// Sampler state to use.
/// </summary>
public SamplerState samplerState;
/// <summary>
/// The depth stencil state to use.
/// </summary>
public DepthStencilState depthStencilState;
/// <summary>
/// The rasterizer state to use.
/// </summary>
public RasterizerState rasterizerState;
/// <summary>
/// The effect to use.
/// </summary>
public Effect effect;
/// <summary>
/// The transformation matrix to use.
/// </summary>
public Matrix transformMatrix;
/// <summary>
/// Begins the given sprite batch with the current set of settings.
/// </summary>
/// <param name="spriteBatch">Begins the spritebatch with the given settings.</param>
public void BeginSpriteBatch(SpriteBatch spriteBatch)
{
spriteBatch.Begin(spriteSortMode, blendState, samplerState, depthStencilState, rasterizerState, effect, transformMatrix);
}
}
}