protected override void UninitializeInternal() { if(State != null) { State.Dispose(); State = null; } }
protected override void UninitializeInternal() { if (State != null) { State.Dispose(); State = null; } }
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); }
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); }