XNAMATH unsigned integer vector type?
#1 Members - Reputation: 190
Posted 25 March 2012 - 08:17 PM
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.
#3 Senior Moderators - Reputation: 3117
Posted 25 March 2012 - 08:43 PM
Its not XNA, its DirectXMath (formerly XNAMath). Which is a library provided with the DirectX SDK.I don't use XNA, but you could just make your own data type with 4 unsigned ints.
XMVECTORU32 is probably the type you want...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.
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
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX
#4 Members - Reputation: 190
Posted 26 March 2012 - 07:29 AM
And lastly you can use XMUINT4... http://msdn.microsof...4(v=vs.85).aspx http://msdn.microsof...4(v=vs.85).aspx
Thanks. Have you tried XMUINT4? It was not recognized as a type. I am including "xnamath.h".
Edit: Oh I see, it references DirectXMath.h. I will try that.






