error X3025: global variables are implicitly constant, enable compatibility mode to allow modification

简介: error X3025: global variables are implicitly constant, enable compatibility mode to allow modification 全局变量是extern也是常量,在shader里面不能修改,但可以从宿主程序里改。
error X3025: global variables are implicitly constant, enable compatibility mode to allow modification
全局变量是extern也是常量,在shader里面不能修改,但可以从宿主程序里改。
以前的编译器没有强制这一点,现在新的强化了这一要求。

把extern
改成static运行成功



Feedback




# re:
error X3025  回复  更多评论  

2008-12-17 10:06 by
Axif

我把extern 改成static了,但是还是出现相同的错误 555555555



# re:
error X3025  回复  更多评论  

2009-04-23 22:57 by
Leaf

我也遇到了这个问题谢谢!



# re: error X3025  回复  更多评论  

2010-02-02 14:43 by
路人乙

将D3DXCompileShaderFromFile的第六个参数改为D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY即可




# re: error X3025  回复  更多评论  

2010-04-12 17:10 by
river

@路人乙
这个方法好



# re: error X3025  回复  更多评论  

2010-09-09 14:34 by
好看的电影

这里是拯救帖



# re: error X3025  回复  更多评论
 

2011-06-11 14:45 by
Scarlettlee

@路人乙
这个方法很好
相关文章
|
6月前
|
Oracle 关系型数据库
Mixed Mode Auditing
Mixed Mode Auditing
23 1
|
18天前
|
关系型数据库 MySQL Linux
Packet for query is too large (4467936 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable
【10月更文挑战第15天】解决Packet for query is too large (4467936 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable
35 1
|
6月前
|
JavaScript
报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
110 2
|
Web App开发 JavaScript 安全
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
216 0
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
解决办法:defined but not used [-Werror=unused-variable]
解决办法:defined but not used [-Werror=unused-variable]
775 0
|
Java Android开发
is not allowed for source level below 1.7 的解决办法
is not allowed for source level below 1.7 的解决办法
184 0
ini_set ("display_errors","On"); 和 error_reporting (E_ALL);
ini_set ("display_errors","On"); 和 error_reporting (E_ALL);
|
C语言
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
[Error] ‘for’ loop initial declarations are only allowed in C99 or C11 mode [Note] use option -std=c99,-std=gnu99,-std=c11 or-std=gnu11 to compile your code
1460 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
|
C语言
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
328 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode