Hello! So I've been struggling with getting XMVECTOR and XMMATRIX working when defined in my header file. If I do:
XMMATRIX World;
XMVECTOR camPosition;
in the header file for example, and then do:
camPosition = XMVectorSet( 0.0f, 0.0f, -0.5f, 0.0f );
in my .cpp file, for example. It gives me an "access violation" error. I read that this is because of some kind of alignment thingy? Is there no way to get the XMVECTOR or XMMATRIX defined in the header file and then use it in the .cpp file?
If not, what should I do instead? Because defining them in the .cpp file works, but that looks so bad? Any other solutions, what do you guys do?