Mark!!! enable compatibility mode to allow modification.

来源:互联网 发布:java计算1到100的阶乘 编辑:程序博客网 时间:2024/05/16 18:36

enable compatibility mode to allow modification.

编译vertex shader出现:\error X3025:global variables are implicitly constant,enable compatibility mode to allow modification.

这是因为当前编译的shader基于一个较老的shader版本,必须指定兼容模式D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY才能 编译通过

也就是在调用D3DXCompileShaderFromFile编译shader时,第6个参数必须包含此值。


Mark!!!

原创粉丝点击