/// <summary> /// Set the blend state of the output-merger stage. See <see cref="Render+states"/> to learn how to use it. /// </summary> /// <param name="blendState">a blend-state</param> /// <param name="blendFactor">Blend factors, one for each RGBA component. This requires a blend state object that specifies the <see cref="Blend.BlendFactor" /></param> /// <param name="multiSampleMask">32-bit sample coverage. The default value is 0xffffffff.</param> private void SetBlendStateImpl(BlendState blendState, Color4 blendFactor, int multiSampleMask = -1) { if (blendState == null) { NativeDeviceContext.OutputMerger.SetBlendState(null, ColorHelper.Convert(blendFactor), multiSampleMask); } else { NativeDeviceContext.OutputMerger.SetBlendState((SharpDX.Direct3D11.BlendState)blendState.NativeDeviceChild, ColorHelper.Convert(blendFactor), multiSampleMask); } }