Пример #1
0
        public static BlendingFactorDest To(DestinationBlendingFactor factor)
        {
            switch (factor)
            {
            case DestinationBlendingFactor.Zero:
                return(BlendingFactorDest.Zero);

            case DestinationBlendingFactor.One:
                return(BlendingFactorDest.One);

            case DestinationBlendingFactor.SourceColor:
                return(BlendingFactorDest.SrcColor);

            case DestinationBlendingFactor.OneMinusSourceColor:
                return(BlendingFactorDest.OneMinusSrcColor);

            case DestinationBlendingFactor.SourceAlpha:
                return(BlendingFactorDest.SrcAlpha);

            case DestinationBlendingFactor.OneMinusSourceAlpha:
                return(BlendingFactorDest.OneMinusSrcAlpha);

            case DestinationBlendingFactor.DestinationAlpha:
                return(BlendingFactorDest.DstAlpha);

            case DestinationBlendingFactor.OneMinusDestinationAlpha:
                return(BlendingFactorDest.OneMinusDstAlpha);

            case DestinationBlendingFactor.DestinationColor:
                return(BlendingFactorDest.DstColor);

            case DestinationBlendingFactor.OneMinusDestinationColor:
                return(BlendingFactorDest.OneMinusDstColor);

            case DestinationBlendingFactor.ConstantColor:
                return(BlendingFactorDest.ConstantColor);

            case DestinationBlendingFactor.OneMinusConstantColor:
                return(BlendingFactorDest.OneMinusConstantColor);

            case DestinationBlendingFactor.ConstantAlpha:
                return(BlendingFactorDest.ConstantAlpha);

            case DestinationBlendingFactor.OneMinusConstantAlpha:
                return(BlendingFactorDest.OneMinusConstantAlpha);
            }

            throw new ArgumentException("factor");
        }
Пример #2
0
        public static BlendingFactorDest To(DestinationBlendingFactor factor)
        {
            switch (factor)
            {
                case DestinationBlendingFactor.Zero:
                    return BlendingFactorDest.Zero;
                case DestinationBlendingFactor.One:
                    return BlendingFactorDest.One;
                case DestinationBlendingFactor.SourceColor:
                    return BlendingFactorDest.SrcColor;
                case DestinationBlendingFactor.OneMinusSourceColor:
                    return BlendingFactorDest.OneMinusSrcColor;
                case DestinationBlendingFactor.SourceAlpha:
                    return BlendingFactorDest.SrcAlpha;
                case DestinationBlendingFactor.OneMinusSourceAlpha:
                    return BlendingFactorDest.OneMinusSrcAlpha;
                case DestinationBlendingFactor.DestinationAlpha:
                    return BlendingFactorDest.DstAlpha;
                case DestinationBlendingFactor.OneMinusDestinationAlpha:
                    return BlendingFactorDest.OneMinusDstAlpha;
                case DestinationBlendingFactor.DestinationColor:
                    return BlendingFactorDest.DstColor;
                case DestinationBlendingFactor.OneMinusDestinationColor:
                    return BlendingFactorDest.OneMinusDstColor;
                case DestinationBlendingFactor.ConstantColor:
                    return BlendingFactorDest.ConstantColor;
                case DestinationBlendingFactor.OneMinusConstantColor:
                    return BlendingFactorDest.OneMinusConstantColor;
                case DestinationBlendingFactor.ConstantAlpha:
                    return BlendingFactorDest.ConstantAlpha;
                case DestinationBlendingFactor.OneMinusConstantAlpha:
                    return BlendingFactorDest.OneMinusConstantAlpha;
            }

            throw new ArgumentException("factor");
        }