Skip to main content
GameDev.net gamedev.net
🔒 Locked

D3DX10CompileFromFile failing!

Started by microlee Jun 28, 2009 at 4:24 AM 1 replies 2.1k views
Original Post
microlee
microlee
I am learning D3D10 now, and i want to create a demo without DXUT or Effect system, so i need to set the global variables manually, but when i am using D3DX10CompileFromFile to compile MyTest_VS.vsh but it is failing with E_FAIL. The code I'm using is as follows: DWORD dwShaderFlags = 0; dwShaderFlags |= D3D10_SHADER_DEBUG; ID3D10Blob* pVSBuf = NULL; ID3D10Blob* pErrorMsg = NULL; hr = D3DX10CompileFromFile( L"MyTest_VS.vsh", NULL, NULL, "VS", "vs_4_0", dwShaderFlags, NULL, NULL, &pVSBuf, &pErrorMsg, NULL ) ; if( FAILED( hr )) return hr; and i have setup the device with the Device creation flags like this: createDeviceFlags = D3D10_CREATE_DEVICE_DEBUG; D3D10CreateDeviceAndSwapChain( NULL, g_driverType, NULL, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice ); Anybody can give me some information about this error?? thx!
feal87
feal87
E_FAIL is just a generic error, you must give us the exact detailed error or post the shader so we can test it. (try with fxc and tell us what it says)
microlee
microlee
Quote:
Original post by feal87
E_FAIL is just a generic error, you must give us the exact detailed error or post the shader so we can test it. (try with fxc and tell us what it says)


Thank you very much! your words give me the afflatus. I have fixed this issue, the problem is the VS shader output,

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.