示例#1
0
        public void Blur1D(IBlur1DStage stage, ITexture source, IRenderTarget target)
        {
            if (stage == null)
            {
                throw new Yak2DException("Unable to queue Blur1DEffectStage. Stage is null", new ArgumentNullException());
            }

            if (source == null)
            {
                throw new Yak2DException("Unable to queue Blur1DEffectStage. Source is null", new ArgumentNullException());
            }

            if (target == null)
            {
                throw new Yak2DException("Unable to queue Blur1DEffectStage. Target is null", new ArgumentNullException());
            }

            if (source.Id == target.Id)
            {
                throw new Yak2DException("Unable to queue Blur1DEffectStage. Source and Target Surfaces cannot be the same", new ArgumentNullException());
            }

            _commandQueue.Add(RenderCommandType.Blur1DEffectStage,
                              stage.Id,
                              target.Id,
                              0UL,
                              source.Id,
                              0UL,
                              0UL,
                              0UL,
                              RgbaFloat.Clear);
        }
示例#2
0
文件: Stages.cs 项目: AlzPatz/yak2d
        public void SetBlur1DConfig(IBlur1DStage effect, Blur1DEffectConfiguration config, float transitionSeconds)
        {
            if (effect == null)
            {
                throw new Yak2DException("Unable to set blur1d effect as stage passed is null");
            }

            SetBlur1DConfig(effect.Id, config, transitionSeconds);
        }