Example #1
0
 protected override void UninitializeInternal()
 {
     if(State != null)
     {
         State.Dispose();
         State = null;
     }
 }
Example #2
0
 protected override void UninitializeInternal()
 {
     if (State != null)
     {
         State.Dispose();
         State = null;
     }
 }
Example #3
0
        protected override void InitializeInternal()
        {
            var descr = new BlendStateDescription
            {
                AlphaToCoverageEnable  = Settings.EnableAlphaToCoverage,
                IndependentBlendEnable = false,
            };

            descr.RenderTarget[0] = new RenderTargetBlendDescription
            {
                IsBlendEnabled        = true,
                SourceBlend           = GetBlendOption(Settings.FirstRGB),
                DestinationBlend      = GetBlendOption(Settings.SecondRGB),
                BlendOperation        = GetBlendOperation(Settings.OutputRGB),
                SourceAlphaBlend      = GetBlendOption(Settings.FirstAlpha),
                DestinationAlphaBlend = GetBlendOption(Settings.SecondAlpha),
                AlphaBlendOperation   = GetBlendOperation(Settings.OutputAlpha),
                RenderTargetWriteMask = (ColorWriteMaskFlags)Settings.OutputColorComponents
            };

            State = new global::SharpDX.Direct3D11.BlendState(DeviceManager.Device, descr);
        }
Example #4
0
        protected override void InitializeInternal()
        {
            var descr = new BlendStateDescription
            {
                AlphaToCoverageEnable = Settings.EnableAlphaToCoverage,
                IndependentBlendEnable = false,
            };

            descr.RenderTarget[0] = new RenderTargetBlendDescription
            {
                IsBlendEnabled = true,
                SourceBlend = GetBlendOption(Settings.FirstRGB),
                DestinationBlend = GetBlendOption(Settings.SecondRGB),
                BlendOperation = GetBlendOperation(Settings.OutputRGB),
                SourceAlphaBlend = GetBlendOption(Settings.FirstAlpha),
                DestinationAlphaBlend = GetBlendOption(Settings.SecondAlpha),
                AlphaBlendOperation = GetBlendOperation(Settings.OutputAlpha),
                RenderTargetWriteMask = (ColorWriteMaskFlags)Settings.OutputColorComponents
            };

            State = new global::SharpDX.Direct3D11.BlendState(DeviceManager.Device, descr);
        }