Can you use XMMATRIX and XMVECTOR for storage?
In a lot of situations if would find it more convenient to keep my data in a XMMATRIX or XMVECTOR format,intead of storing it back to a XMFLOAT*** structure.
You can but you need to be careful about alignment issues. XMMATRIX and XMVECTOR need to be 16-byte aligned. See here for more on it: http://msdn.microsoft.com/en-us/library/ee418732(VS.85).aspx#Properly_Align_Alloc . You can see an example of how to deal with a 'new' alignment in the SpriteBatch class in DirectXTK - http://directxtk.codeplex.com/ - and its AlignedNew.h header file.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement