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

@路人乙
这个方法很好
相关文章
|
7月前
|
Oracle 关系型数据库
Mixed Mode Auditing
Mixed Mode Auditing
25 1
|
7月前
|
Python
global
global
97 1
|
2月前
|
关系型数据库 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
97 1
|
7月前
global使用和不使用的情况总结
global使用和不使用的情况总结
40 1
|
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
218 0
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
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
1518 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
Error: invalid option: --with-training-tools
Error: invalid option: --with-training-tools
174 0
|
安全 对象存储
set_time_limit() has been disabled for security reasons
set_time_limit() has been disabled for security reasons
170 0
set_time_limit() has been disabled for security reasons
|
C语言
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
333 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode