Hi,
I have two questions regarding the parameter changes with D3DX10CreateEffectFromFile:
1. What is the purpose of the 12th parameter in function D3DX10CreateEffectFromFile ?
In file d3dx10async.h, D3DX10CreateEffectFromFile is declared as :
#ifdef UNICODE
#define D3DX10CreateEffectFromFile D3DX10CreateEffectFromFileW
#define D3DX10CreateEffectFromResource D3DX10CreateEffectFromResourceW
#else
#define D3DX10CreateEffectFromFile D3DX10CreateEffectFromFileA
#define D3DX10CreateEffectFromResource D3DX10CreateEffectFromResourceA
#endif
D3DX10CreateEffectFromFileW has this declaration:
HRESULT WINAPI D3DX10CreateEffectFromFileW(LPCWSTR pFileName, CONST D3D10_SHADER_MACRO *pDefines,
ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice,
ID3D10EffectPool *pEffectPool, ID3DX10ThreadPump* pPump, ID3D10Effect **ppEffect, ID3D10Blob **ppErrors, HRESULT* pHResult);
D3DX10CreateEffectFromFileA has this declaration:
HRESULT WINAPI D3DX10CreateEffectFromFileA(LPCSTR pFileName, CONST D3D10_SHADER_MACRO *pDefines,
ID3D10Include *pInclude, LPCSTR pProfile, UINT HLSLFlags, UINT FXFlags, ID3D10Device *pDevice,
ID3D10EffectPool *pEffectPool, ID3DX10ThreadPump* pPump, ID3D10Effect **ppEffect, ID3D10Blob **ppErrors, HRESULT* pHResult);
The last parameter, HRESULT* pHResult looks new. The DirectX documentation that comes with the installer describes D3DX10CreateEffectFromFile with only 11 parameters.
2. LPCSTR pProfile requires the user to specify a shader model. Does this mean that I can only have one technique in my effect file, with CompileShader using the same shader model as D3DX10CreateEffectFromFile? The last SDK I used was February07, and D3DX10CreateEffectFromFile takes only 10 parameters, without the pProfile.
Thanks for your answers.