使用自定义资源的错误
在一段代码中,我用以下函数:
D3DXCreateEffectFromResource( pd3dDevice, NULL, L"A.fx", NULL, NULL, D3DXFX_NOT_CLONEABLE, NULL, &g_pEffect9, NULL )
其中使用了一个A.fx的自定义resource,类型为"FX",ID为IDR_FX1(没有用过)。这个文件已经包含在resource中,itemtype为resource。但在编译时,出现错误:
fatal error LNK1107: invalid or corrupt file: cannot read at 0x107C
编译到A.fx文件第一行时,出现以上代码。
求解。
[解决办法]
fx是HSLL特效吧?
http://www.gamedev.net/topic/347719-problems-with-d3dxcreateeffectfromresource/