Complie the Car demo has a problem
My Environment:
Windows Xp
8600GT
Direct 9.0c
tokamaksample.App.cpp
line 68
V_RETURN( D3DXCreateEffectFromFile( pd3dDevice, str, NULL, NULL, dwShaderFlags,
NULL, &g_pEffect, NULL ) );
the reason:
the Main.fx use global variables .
----- From the dx forum ----
Writing to global variables has caused much confusion in the past.
People thought that if the write a value in one pixel/vertex the can
read it in another. To make sure that this could not happen again the
parser now forces all global variables to be const.
If you use FXC you should add /Gec to get the compatibility mode.
If you use the API the right flag is D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY
If this doesn't help you can even use the old compiler with
D3DXSHADER_USE_LEGACY_D3DX9_31_DLL or /LD
so I use
//dwShaderFlags |= D3DXSHADER_DEBUG;
dwShaderFlags |= D3DXSHADER_USE_LEGACY_D3DX9_31_DLL;
for Temporary Fixed