1
\$\begingroup\$

I have a array of six float4x4's in my shader.

cbuffer pseudeocb
{
    float4x4 Mypseudo[6];
};

I need to set these in my code.

ID3DX11EffectMatrixVariable* Pseudo;
void SetPseudo(CXMMATRIX M) { Pseudo->SetMatrix(reinterpret_cast<const float*>(&M)); }
Pseudeo = mFX->GetVariableByName("Mypseudo")->AsMatrix();

This will set one. How do I set six of them? Do I need a SetPseudo function?

Can I do something like the following:

XMMATRIX *p = new XMMATRIX[6];

or

XMMATRIX p[6];
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.