atikking / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

SlimDX::Direct3D10::StateBlockMask is broken #881

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
(as of revision 2203)

The current implementation of StateBlockMask::StateBlockMask( const 
D3D10_STATE_BLOCK_MASK& native ) doesn't work, it tries to set list elements 
that don't exist, resulting in ArgumentOutOfRange exceptions.

Secondly, all of those List<bool>s are exposed as ReadOnlyCollection<bool>s, 
which mean you can't modify them. At all. This surely isn't the intended 
behavior.

Thirdly, a bunch of useful functions related to StateBlockMasks are not exposed:
- D3D10StateBlockMaskDifference
- D3D10StateBlockMaskDisableAll
- D3D10StateBlockMaskDisableCapture
- D3D10StateBlockMaskEnableAll
- D3D10StateBlockMaskEnableCapture
- D3D10StateBlockMaskGetSetting
- D3D10StateBlockMaskIntersect
- D3D10StateBlockMaskUnion

Attached is my patch.

I've gone ahead and reimplemented all of the List<bool>s into initonly 
array<bool>s, and changed the ReadOnlyCollection<bool>s into array<bool>s as 
well. I'm not sure if this is the correct solution, but it works for me.

I've also implemented all of the functions mentioned earlier (except for three, 
D3D10StateBlockMaskDisableCapture, D3D10StateBlockMaskEnableCapture, 
D3D10StateBlockMaskGetSetting, I only wanted D3D10StateBlockMaskEnableAll, but 
went ahead and implemented the other easy ones beside that).

Original issue reported on code.google.com by r...@gibbed.us on 9 Aug 2012 at 6:29

Attachments:

GoogleCodeExporter commented 8 years ago
Nice. I'll integrate this for the next release.

Original comment by Mike.Popoloski on 10 Sep 2012 at 2:13

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r2206.

Original comment by Mike.Popoloski on 15 Sep 2012 at 6:24