mono/MonoGame — pull request #1906 by tomspilman (2013-08-06 01:39:40+00:00)
Title: Independent Blend States

This extends the core XNA4 API to support independent blend states for up to 4 bound render targets.

So existing XNA4 code like this still works:

```
var state = new BlendState();
state.ColorBlendFunction = BlendFunction.Add;
state.ColorSourceBlend = Blend.One;
state.ColorDestinationBlend = Blend.InverseSourceColor;
```

But you can now do this too:

```
var state = new BlendState();
state.IndependentBlendEnable = true;
state[0].ColorBlendFunction = BlendFunction.Add;
state[0].ColorSourceBlend = Blend.One;
state[0].ColorDestinationBlend = Blend.InverseSourceColor;
state[1].ColorBlendFunction = BlendFunction.Add;
state[1].ColorSourceBlend = Blend.SourceAlpha;
state[1].ColorDestinationBlend = Blend.InverseSourceAlpha;
```

This only works for DX platforms right now. In theory this feature could be extended to GL platforms that support it.

While i was at it i added the missing `Dispose(bool)` and added the asserts when changing states after the target is bound.