• Advertisement
Sign in to follow this  

XNAMATH unsigned integer vector type?

This topic is 2156 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm struggling with the documentation for XNAMATH, trying to use some form of vector of 4 unsigned integers in my constant buffer.

Below is an example of using a 4 component vector of floats, but I want to use unsigned integers.

ConstantBuffer cb1;
cb1.threadGroupDims = XMFLOAT4(destDim, 0, 0, 0);
m_pContext->UpdateSubresource(m_pConstantBuffer, 0, NULL, &cb1, 0, 0);


Does anyone know the typename?

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I don't use XNA, but you could just make your own data type with 4 unsigned ints.

Share this post


Link to post
Share on other sites

I don't use XNA, but you could just make your own data type with 4 unsigned ints.

Its not XNA, its DirectXMath (formerly XNAMath). Which is a library provided with the DirectX SDK.


I'm struggling with the documentation for XNAMATH, trying to use some form of vector of 4 unsigned integers in my constant buffer.

Below is an example of using a 4 component vector of floats, but I want to use unsigned integers.

ConstantBuffer cb1;
cb1.threadGroupDims = XMFLOAT4(destDim, 0, 0, 0);
m_pContext->UpdateSubresource(m_pConstantBuffer, 0, NULL, &cb1, 0, 0);


Does anyone know the typename?

Thanks.

XMVECTORU32 is probably the type you want...
http://msdn.microsof...7(v=vs.85).aspx

Alternatively you can use XMVectorSetInt http://msdn.microsof...2(v=vs.85).aspx

And lastly you can use XMUINT4... http://msdn.microsof...4(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.reference.xmuint4(v=vs.85).aspx

Share this post


Link to post
Share on other sites
OK I believe I ran into this problem before. I am on Windows 7 and do not know where to get DirectXMath for a non-Windows 8 platform.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement