Wednesday, 11 September 2013

Trouble with D3DX10CreateEffectFromFile

Trouble with D3DX10CreateEffectFromFile

I've been having a problem loading an effect file. My call to
D3DX10CreateEffectFromFile() passes with S_OK, but the ID3D10Effect* I
pass into it remains null after the function call. Here is my source (I've
been debugging, so there's stuff commented out, but the relevant code is
still executing).
HRESULT hResult;
void fxMgr::LoadEffectFile( char* fxFileName,
char* techniqueName,
ID3D10Effect* pEffect,
dgInputLayoutType layoutType)
{
/*if (L"fx"!=GetFileExtension(fxFileName))
{
pEffect=NULL;
throw dgGameError(L"Could not load specified shader!");
return;
}
*/
if (NULL==fxFileName)
{
pEffect=NULL;
m_pCurEffect=NULL;
m_pCurEffectTechnique=NULL;
m_pCurPass=NULL;
}
return;
HRESULT r = 0;
DWORD shaderFlags = 0;//D3D10_SHADER_ENABLE_STRICTNESS;
/* #if defined( DEBUG ) || defined( _DEBUG )
// Turn on extra debug info when in debug config
shaderFlags |= D3D10_SHADER_DEBUG;

No comments:

Post a Comment