Search code examples
directx-11directxmathdirectxtk

GXMVECTOR - Documentation?


I am trying to re-learn directx after a decade of doing other things. I read a tutorial on the github wiki on how to render some sprites:

https://github.com/Microsoft/DirectXTK/wiki/Sprites-and-textures

In the Draw method it uses 'DirectX::SpriteBatch::Draw' and one of the overloads seems to have a parameters for an 'FXMVECTOR' and 'GXMVECTOR'. I managed to find some documentation for the former, but can't find any for the latter.

Can anyone tell me where to look? Is it part of DirectXMath or something else?


Solution

  • When you see FXMVECTOR, CXMVECTOR, GXMVECTOR, or HXMVECTOR just read XMVECTOR. Same for FXMMATRIX and CXMMATRIX vs. XMMATRIX. It's just some typedef magic stuff I had to do to support the various calling conventions for x86 __fastcall, x64 __fastcall, x86/x64 __vectorcall, and Windows on ARM which are all subtlety different.

    For documentation details on these types, see Microsoft Docs.

    If you are new to DirectXMath, you probably want to take a look at the Simple Math wrapper in the DirectX Tool Kit.