I am using DirectX 11 and trying to load variables locally in scope using XMLoadFloat4. I am doing a lot of it and names are pretty long so I don't want to create bunch of local variables, however with code like this:
XMStoreFloat4(&vertices[0].normal, XMVector3Cross(
XMLoadFloat4(&(vertices[2].position - vertices[0].position)),
XMLoadFloat4(&(vertices[0].position - vertices[1].position))
));
I'm getting C2102. Do you know elegant way to create reference in place like this?
You can work around this issue for now by disabling /permissive- by changing "Conformance Mode" to "No" in the C/C++ -> Language project settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With