Hi,
I've been trying to put together a DX 9 framework over the last week or so in an attempt to re-fresh my memory with using it. Unfortunatly I've seem to have forgotten more than I still remember [oh].
The code compiles with no errors, but during runtime I get a crash at the start of the draw loop:-
m_cDraw->m_FX->Begin(numPasses, 0); //Crashes here
m_cDraw->updateFX(m_matActor, *matWorld, *matView, *matProj);
m_cDraw->m_FX->BeginPass(0);
m_cActorPrim->DrawTri(gd3dDevice);
m_cDraw->m_FX->EndPass();
m_cDraw is an instance of the effect class. At the time of crash the handles to the technique and the WVP matrix in the shader are bad pointers. So I back tracked to where they initially get set and found that they never actually get set.
//Obtaining handle to an effect
mhTech = m_FX ->GetTechniqueByName("TransformTech");
mhWVP = m_FX->GetParameterByName(0, "gWVP");
The method is called, the code is exectued, but they remain bad pointers and I'm not sure why this is. Can anyone help? I'll post more code if its needed.