This project has moved and is read-only. For the latest updates, please go here.

Better integration with DirectXMath


To use FX11 with DirectXMath (aka XNAMath 3) currently you have to store to XMFLOAT4, XMFLOAT4X4 types and then cast.

Would be a bit more convenient if ID3DX11EffectVectorVariable had some overloads for SetFloatVector, GetFloatVector takes takes XMFLOAT4 or XMVECTOR; SetFloatVectorArray, GetFloatVectorArray takes XMFLOAT4*.

ID3DX11EffectMatrixVariable should have overloads for SetMatrix, GetMatrix, SetMatrixTranspose, GetMatrixTranspose that takes XMFLOAT4X4 or XMMATRIX; SetMatrixArray, GetMatrixArray takes XMFLOAT4X4.


walbourn wrote Sep 4, 2013 at 12:26 AM

There are a few downsides to this:
  1. It would pick up a dependency on DirectXMath / XNAMath types. Not a big deal, but currently there are no such dependencies.
  2. The COM-style API doesn't support overloads, so they would have to be C++ specific and wouldn't be available for interop. Again, not a big deal since DirectMath / XNAmath are C++ only