A few days ago, I updated the dxsdk, used 2006 (DEC) under the wild boar, ran the editor, and found
One problem is that FX that can be correctly compiled previously is not working now. We can trace it step by step and find that d3dxcreateeffectfromfile
The returned error is include "Global. FXX. However, the global. FXX file obviously exists.
In the same directory as the FX file to be compiled. I tried various methods to modify various configurations, that is, the compilation failed.
Finally, I had to write the absolute path of Global. FXX in FX. OK. It's strange.
Analysis result: When d3dxcreateeffectfromfile is used, the include processing is not similar to C ++.
Relative to this FX file, is it related to the current path? So I modified the include and considered to executeProgramOf
Current path. Everything works. I faint. The strange setting is that August 2005 didn't do this before ..
How can I know the current path when I write FX?
The proposed solution uses macros to define absolute paths, but # include cannot use macro.
Do I have to use setcurrentdirectory for createeffect? Isn't that disgusting?
Of course, when the game was finally released in my engine, I made a d3dxinclude interface to solve the problem.
This problem, but during the debugging period, I hope to be able to RT debug FX. I got sick.
I haven't updated my blog for a long time. I want to write a few other things that have happened recently:
1. Xiao Wei made another colleague and asked him to separate the scenes.
2. I accidentally bumped into a rock when I was eating and parking, and my heart hurts.
3. Unfortunately recently, my wife and I are both ill.
4. In the company, too many sb. I'm going to get sick of them.