示例#1
0
		internal static void OnBegin (SpriteBatch __instance, SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformMatrix) {
			DrawState.OnBegin(
				__instance,
				sortMode,
				blendState ?? BlendState.AlphaBlend,
				samplerState ?? SamplerState.PointClamp,
				depthStencilState ?? DepthStencilState.None,
				rasterizerState ?? RasterizerState.CullCounterClockwise,
				effect,
				transformMatrix
			);
		}
示例#2
0
    public static void OnBegin(XSpriteBatch __instance, ref SpriteSortMode sortMode, BlendState?blendState, SamplerState?samplerState, DepthStencilState?depthStencilState, RasterizerState?rasterizerState, Effect?effect, Matrix?transformMatrix)
    {
        if (!Config.IsEnabled)
        {
            return;
        }

        /*
         * if (sortMode is (SpriteSortMode.Deferred or SpriteSortMode.Immediate)) {
         *      sortMode = SpriteSortMode.Texture;
         * }
         */

        DrawState.OnBegin(
            __instance,
            sortMode,
            blendState ?? BlendState.AlphaBlend,
            samplerState ?? SamplerState.PointClamp,
            depthStencilState ?? DepthStencilState.None,
            rasterizerState ?? RasterizerState.CullCounterClockwise,
            effect,
            transformMatrix ?? Matrix.Identity
            );
    }