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

@路人乙
这个方法很好
相关文章
|
19天前
|
Oracle 关系型数据库
Mixed Mode Auditing
Mixed Mode Auditing
9 1
|
Java Android开发
is not allowed for source level below 1.7 的解决办法
is not allowed for source level below 1.7 的解决办法
126 0
|
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
179 0
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)
MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)
220 0
|
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
1145 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
|
安全 对象存储
set_time_limit() has been disabled for security reasons
set_time_limit() has been disabled for security reasons
141 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
278 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
After Opp is saved - change mode filling place
After Opp is saved - change mode filling place
After Opp is saved - change mode filling place
Error saving your changes: Description control characters are not allowed
在修改 GitHub 上的仓库描述时出现此提示信息:Error saving your changes: Description control characters are not allowed 开始以为是 Fork 来的没有修改权限,但之前没有遇到这样的情况,提示信息说的也不是这个意思。
2341 0