예제 #1
0
 public static void Begin(this SpriteBatch spriteBatch, SpriteBatchParameters parameters)
 {
     spriteBatch.Begin(parameters.SortMode,
                       parameters.BlendState,
                       parameters.SamplerState,
                       parameters.DepthStencilState,
                       parameters.RasterizerState ?? BlishHud.UiRasterizer,
                       parameters.Effect,
                       parameters.TransformMatrix ?? GameService.Graphics.UIScaleTransform);
 }
예제 #2
0
 public static bool ParamsEqual(SpriteBatchParameters leftSpriteBatchParams, SpriteBatchParameters rightSpriteBatchParams)
 {
     return(Equals(leftSpriteBatchParams, rightSpriteBatchParams) ||
            (Equals(leftSpriteBatchParams.SortMode, rightSpriteBatchParams.SortMode) &&
             Equals(leftSpriteBatchParams.BlendState, rightSpriteBatchParams.BlendState) &&
             Equals(leftSpriteBatchParams.DepthStencilState, rightSpriteBatchParams.DepthStencilState) &&
             Equals(leftSpriteBatchParams.RasterizerState, rightSpriteBatchParams.RasterizerState) &&
             Equals(leftSpriteBatchParams.Effect, rightSpriteBatchParams.Effect) &&
             Equals(leftSpriteBatchParams.TransformMatrix, rightSpriteBatchParams.TransformMatrix)));
 }