Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Can you use XMMATRIX and XMVECTOR for storage?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 mrheisenberg   Members   -  Reputation: 332

Like
0Likes
Like

Posted 07 November 2012 - 02:09 PM

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.

Sponsor:

#2 MikeBMcL   Members   -  Reputation: 171

Like
0Likes
Like

Posted 07 November 2012 - 07:21 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS