Jump to content

  • Log In with Google      Sign In   
  • Create Account

XNA Math equivalent of ID3DXMatrixStack?


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
2 replies to this topic

#1 Chris_J_H   Members   -  Reputation: 256

Like
0Likes
Like

Posted 06 January 2013 - 11:21 AM

Hi - quick topic (I hope): I am refactoring my C++ directx9 game that makes use of an ID3DXMatrixStack in its scene node tree rendering traversal. I am trying to eliminate all references to the old D3DXMath library replacing all with XNA Math/DirectXMath to use SSE. Firstly: is there an equivalent XNA Math Matrix Math structure? - there doesn't appear to be so, so failing that would you give  some suggestions for replacement implementation - and what might be normal? From what I see any solution seems to require an aligned XMMATRIX structure member... if I am to pick-up the SSE performance gain. Thanks vm.



Sponsor:

#2 MJP   Moderators   -  Reputation: 11442

Like
1Likes
Like

Posted 06 January 2013 - 02:30 PM

Unfortunately there's no equivalent for ID3DXMatrixStack. However if you know how it works it shouldn't be terribly difficult to implement your own version. If you're going to use something like std::vector to store the matrices in the stack you can store them as XMFLOAT4X4, and then load that into an XMMATRIX only when you need to do math operations with that matrix.



#3 Chris_J_H   Members   -  Reputation: 256

Like
0Likes
Like

Posted 07 January 2013 - 12:49 AM

Unfortunately there's no equivalent for ID3DXMatrixStack. However if you know how it works it shouldn't be terribly difficult to implement your own version. If you're going to use something like std::vector to store the matrices in the stack you can store them as XMFLOAT4X4, and then load that into an XMMATRIX only when you need to do math operations with that matrix.

Fair enough,thanks - I was thinking that maybe i would end up putting passing around XMMATRIX values in the function calls to try to keep the values in the SIMD registers but that is probably over-thinking things... I should go for the direct equivalent and optimize later (if necessary).






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